w1100n
This site is best viewed in Google Chrome
5/10/2019 18:19

https://github.com/golang/go/wiki/WebAssembly
https://tutorialedge.net/golang/go-webassembly-tutorial/

package main

import "fmt"

func main() {
    fmt.Println("Hello, WebAssembly!")
}
GOOS=js GOARCH=wasm go build -o main.wasm
cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" .
go get -u github.com/shurcooL/goexec
goexec 'http.ListenAndServe(":8080", http.FileServer(http.Dir(".")))'


<< Previous Posts Newer Posts >>
辽ICP备14012896