Skip to content

Commit d9ade6d

Browse files
authored
WebAssembly: update support file location
1 parent ab13538 commit d9ade6d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

WebAssembly.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ support file, and a HTML page to connect everything together.
6363
Copy the JavaScript support file:
6464

6565
```sh
66-
cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" .
66+
cp "$(go env GOROOT)/lib/wasm/wasm_exec.js" .
6767
```
6868

6969
Create an `index.html` file:
@@ -120,12 +120,12 @@ rather than a browser, which can be useful for testing and automation.
120120

121121
First, make sure Node is installed and in your `PATH`.
122122

123-
Then, add `$(go env GOROOT)/misc/wasm` to your `PATH`.
123+
Then, add `$(go env GOROOT)/lib/wasm` to your `PATH`.
124124
This will allow `go run` and `go test` find `go_js_wasm_exec` in a `PATH` search
125125
and use it to just work for `js/wasm`:
126126

127127
```console
128-
$ export PATH="$PATH:$(go env GOROOT)/misc/wasm"
128+
$ export PATH="$PATH:$(go env GOROOT)/lib/wasm"
129129
$ GOOS=js GOARCH=wasm go run .
130130
Hello, WebAssembly!
131131
$ GOOS=js GOARCH=wasm go test
@@ -137,15 +137,15 @@ If you're running working on Go itself, this will also allow you to run `run.bas
137137
seamlessly.
138138

139139
`go_js_wasm_exec` is a wrapper that allows running Go Wasm binaries in Node. By default,
140-
it may be found in the `misc/wasm` directory of your Go installation.
140+
it may be found in the `lib/wasm` directory of your Go installation.
141141

142142
If you'd rather not add anything to your `PATH`, you may also set the `-exec` flag to
143143
the location of `go_js_wasm_exec` when you execute `go run` or `go test` manually.
144144

145145
```console
146-
$ GOOS=js GOARCH=wasm go run -exec="$(go env GOROOT)/misc/wasm/go_js_wasm_exec" .
146+
$ GOOS=js GOARCH=wasm go run -exec="$(go env GOROOT)/lib/wasm/go_js_wasm_exec" .
147147
Hello, WebAssembly!
148-
$ GOOS=js GOARCH=wasm go test -exec="$(go env GOROOT)/misc/wasm/go_js_wasm_exec"
148+
$ GOOS=js GOARCH=wasm go test -exec="$(go env GOROOT)/lib/wasm/go_js_wasm_exec"
149149
PASS
150150
ok example.org/my/pkg 0.800s
151151
```
@@ -154,10 +154,10 @@ Finally, the wrapper may also be used to directly execute a Go Wasm binary:
154154

155155
```console
156156
$ GOOS=js GOARCH=wasm go build -o mybin .
157-
$ $(go env GOROOT)/misc/wasm/go_js_wasm_exec ./mybin
157+
$ $(go env GOROOT)/lib/wasm/go_js_wasm_exec ./mybin
158158
Hello, WebAssembly!
159159
$ GOOS=js GOARCH=wasm go test -c
160-
$ $(go env GOROOT)/misc/wasm/go_js_wasm_exec ./pkg.test
160+
$ $(go env GOROOT)/lib/wasm/go_js_wasm_exec ./pkg.test
161161
PASS
162162
ok example.org/my/pkg 0.800s
163163
```

0 commit comments

Comments
 (0)