Skip to content

Commit 187ba67

Browse files
authored
Export new location of support files needed for using Go's WASM output. (#4322)
**What type of PR is this?** Bug fix **What does this PR do? Why is it needed?** In order to run code with GOOS=js GOARCH=wasm in the browser, you need to copy a `.js` file from the toolchain. This file location was changed in Go 1.24, which is now also exported in this PR. **Which issues(s) does this PR fix?** n/a **Other notes for review** See also this info from the Go wiki: > For Go 1.23 and earlier, the wasm support files needed in this article are located in misc/wasm, and the path should be replaced when performing operations with files such as lib/wasm/wasm_exec.js. [source](https://go.dev/wiki/WebAssembly)
1 parent f0d3aa7 commit 187ba67

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

go/private/BUILD.sdk.bazel

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,11 @@ filegroup(
117117
exports_files(
118118
glob([
119119
"lib/time/zoneinfo.zip",
120-
"misc/wasm/**",
120+
# wasm support files including wasm_exec.js
121+
# for GOOS=js GOARCH=wasm
122+
# located in misc/wasm/ (Go 1.23 and earlier)
123+
# or lib/wasm/ (Go 1.24 and later)
124+
"*/wasm/**",
121125
]),
122126
visibility = ["//visibility:public"],
123127
)

0 commit comments

Comments
 (0)