hexops / vecty

Vecty lets you build responsive and dynamic web frontends in Go using WebAssembly, competing with modern web frameworks like React & VueJS.
BSD 3-Clause "New" or "Revised" License
2.82k stars 144 forks source link

Deprecate and remove GopherJS support from Vecty #264

Closed slimsag closed 4 years ago

slimsag commented 4 years ago

History

In Sep 2018 we added WebAssembly support to Vecty in addition to the current GopherJS support. At the time, Go's WebAssembly compilation target (and specifically, syscall/js) were very new and had a number of issues surrounding callbacks and other things that had not yet been worked out.

Originally, supporting both GopherJS and WebAssembly made since because GopherJS was more stable and polished but was difficult because they had separate JS interfaces. GopherJS then gained syscall/js API compatibility https://github.com/gopherjs/gopherjs/pull/908 which reduced the burden on Vecty to support multiple JS interfaces.

A bit about me

I am one lone developer working on Vecty and, while I know and have worked with multiple people in the GopherJS community personally, I am not speaking on behalf of the GopherJS community - I am merely speaking on behalf of myself as a consumer of GopherJS and maintainer of Vecty.

My intent is not to downplay the significance of GopherJS, the accomplishments of people who have worked on it, or anything like that. My sole goal here is to improve the pace at which Vecty can be developed.

The state of GopherJS

In the two years since, Go's native WebAssembly support has gained great momentum and its syscall/js interface has generally become much more stable. WebAssembly is Vecty's preferred compilation target today. GopherJS has seen less time investment from maintainers and the community (my personal belief as a user of it only), is looking for more support and generally I would say has a less certain future.

The state of Vecty + GopherJS

Today, Vecty fully supports three compilation targets:

  1. GopherJS
  2. Go + WebAssembly
  3. Go + native architectures (for testing only).

Supporting GopherJS has been painful because of a few reasons:

Deprecating and removing GopherJS support from Vecty officially

This means that;

When?

This will happen immediately today as the time I have available to spend working on Vecty is quite limited. I could wait for input, but it would mean that this change may not go through for several more months and TinyGo support and a few other things would be delayed further.

Feedback

I am very open to feedback here, my intent is to push development of Vecty further along and if I find a lot of opposition to this change (I anticipate I won't, but I am open to being surprised) I will definitely reconsider the change. Please don't hold back your thoughts/feedback!