example

package module
v0.0.0-...-f980039 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2022 License: BSD-3-Clause Imports: 0 Imported by: 0

README

Building examples

Vecty examples can be built with the Go 1.14+ WebAssembly compilation target.

Additionally, Vecty has experimental support for the TinyGo compiler.

Building for WebAssembly with Go 1.14+

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.

Running examples

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/

Building for TinyGo

TinyGo support is in very early stages still. Please refer to https://github.com/hexops/vecty/issues/269

Building with other Go compilers

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.

More examples

Documentation

Overview

Package example exists as an empty Go module containing all Vecty example dependencies.

It is done such that example dependencies do not end up in downstream go.mod files for users who are just importing Vecty alone.

Directories

Path Synopsis
store/storeutil
Package storeutil contains a ListenerRegistry type.
Package storeutil contains a ListenerRegistry type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL