https://github.com/elgohr/tinygo-wasm
A WASM bootstrap with tinygo
https://github.com/elgohr/tinygo-wasm
bootstrap go tinygo wasm
Last synced: about 2 months ago
JSON representation
A WASM bootstrap with tinygo
- Host: GitHub
- URL: https://github.com/elgohr/tinygo-wasm
- Owner: elgohr
- License: mit
- Created: 2020-04-03T12:01:44.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-13T18:46:27.000Z (about 6 years ago)
- Last Synced: 2025-04-05T23:41:53.407Z (about 1 year ago)
- Topics: bootstrap, go, tinygo, wasm
- Language: JavaScript
- Size: 1.53 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WASM-Bootstrap with tinygo
## Installation
1. [Install tinygo](https://tinygo.org/getting-started/)
2. Install/Use go1.13 (see https://github.com/tinygo-org/tinygo/issues/930)
## Build
For building/refreshing the WASM part of the frontend, run
```bash
export GOROOT=`go1.13 env GOROOT` # see https://github.com/tinygo-org/tinygo/issues/930#issuecomment-605597556
go generate ./...
```
## Testing
This project uses https://github.com/agnivade/wasmbrowsertest
Everything for running should be setup by `go generate ./...` (in wasm-folder) already.
If you want to run this from shell, please make sure to set
```bash
export GOOS=js
export GOARCH=wasm
```
## Run the backend
```bash
go run main.go # make sure to use go1.14 for that
```