Vecty examples can be built with the Go 1.14+ WebAssembly compilation target.
Additionally, Vecty has experimental support for the TinyGo compiler.
Ensure you are running Go 1.14 or higher. Vecty requires Go 1.14+ as it makes use of improvements to the syscall/js
package which are not present in earlier versions of Go.
The easiest way to run the examples as WebAssembly is via wasmserve
.
Install it (using Go 1.14+):
go install github.com/hajimehoshi/wasmserve@latest
Then run an example:
cd example/markdown/
wasmserve
Then navigate to http://localhost:8080/
TinyGo support is in very early stages still. Please refer to #269
Other compilers such as GopherJS may work so long as they are compliant with the official Go 1.14+ compiler (support modules, the syscall/js
interface, reflection, etc.)
Vecty currently can only be built to run in web browsers.
- soypat's vecty-examples, including a snake game and an example of using the Material Design CSS library