File tree 1 file changed +5
-3
lines changed 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -78,17 +78,19 @@ of how WASI works with Go, please see
78
78
79
79
## Running go tests with wasip1
80
80
81
+ > Go 1.24 moved the Wasm support files to ` lib/wasm ` . For Go 1.21 - 1.23, use the ` misc/wasm ` directory.
82
+
81
83
Building and running a binary is easy, but sometimes we want to be able to run
82
84
` go test ` directly without having to build and execute the binary manually.
83
85
Similar to the ` js/wasm ` port, the standard library distribution included
84
86
in your Go installation comes with a file that makes this very easy. Add the
85
- ` misc /wasm` directory to your ` PATH ` when running Go tests and it will
87
+ ` lib /wasm` directory to your ` PATH ` when running Go tests and it will
86
88
run the tests using the Wasm host of your choice. This works by ` go test `
87
89
[ automatically executing] ( https://pkg.go.dev/cmd/go#hdr-Compile_and_run_Go_program )
88
- ` misc /wasm/go_wasip1_wasm_exec` when it finds this file in the ` PATH ` .
90
+ ` lib /wasm/go_wasip1_wasm_exec` when it finds this file in the ` PATH ` .
89
91
90
92
``` shell
91
- $ export PATH=$PATH :$( go env GOROOT) /misc /wasm
93
+ $ export PATH=$PATH :$( go env GOROOT) /lib /wasm
92
94
$ GOOS=wasip1 GOARCH=wasm go test ./...
93
95
```
94
96
You can’t perform that action at this time.
0 commit comments