Skip to content

Commit 5f6954e

Browse files
Zxillygopherbot
authored andcommitted
wasi: update wasm runtime file location
Updates golang/go#68024 Change-Id: I6642d366d292f2ce30f5d49b46e85f175b459914 GitHub-Last-Rev: 7fbfab2 GitHub-Pull-Request: #298 Reviewed-on: https://go-review.googlesource.com/c/website/+/604916 Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Eli Bendersky <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Johan Brandhorst-Satzkorn <[email protected]>
1 parent 2c92ff8 commit 5f6954e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

_content/blog/wasi.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,19 @@ of how WASI works with Go, please see
7878

7979
## Running go tests with wasip1
8080

81+
> Go 1.24 moved the Wasm support files to `lib/wasm`. For Go 1.21 - 1.23, use the `misc/wasm` directory.
82+
8183
Building and running a binary is easy, but sometimes we want to be able to run
8284
`go test` directly without having to build and execute the binary manually.
8385
Similar to the `js/wasm` port, the standard library distribution included
8486
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
8688
run the tests using the Wasm host of your choice. This works by `go test`
8789
[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`.
8991

9092
```shell
91-
$ export PATH=$PATH:$(go env GOROOT)/misc/wasm
93+
$ export PATH=$PATH:$(go env GOROOT)/lib/wasm
9294
$ GOOS=wasip1 GOARCH=wasm go test ./...
9395
```
9496

0 commit comments

Comments
 (0)