Documentation ¶
Overview ¶
A program for testing wasmexport. This is the driver/host program, which provides the imports and calls the exports. testprog is the source of the Wasm module, which can be compiled to either an executable or a library.
To build it as executable: GOARCH=wasm GOOS=wasip1 go build -o /tmp/x.wasm ./testprog
To build it as a library: GOARCH=wasm GOOS=wasip1 go build -buildmode=c-shared -o /tmp/x.wasm ./testprog
Then run the driver (which works for both modes): go run w.go /tmp/x.wasm
Click to show internal directories.
Click to hide internal directories.