From: Cherry Mui Date: Thu, 5 Dec 2024 16:35:37 +0000 (-0500) Subject: doc/next: add release notes for Wasm changes X-Git-Tag: go1.24rc1~24 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=aa464fb953beabae11e94bffde320457f0904352;p=gostls13.git doc/next: add release notes for Wasm changes Document wasmexport and WASI reactor/library mode. Also document that we now permit more types for wasmimport. Fixes #65199. Updates #66984. For #68545. Change-Id: Id26a8c9496650cd154daed679b82223af1848eea Reviewed-on: https://go-review.googlesource.com/c/go/+/634036 Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Reviewed-by: David Chase Reviewed-by: Dmitri Shuralyov --- diff --git a/doc/next/7-ports.md b/doc/next/7-ports.md index 18cd80f8b6..68f5241c6e 100644 --- a/doc/next/7-ports.md +++ b/doc/next/7-ports.md @@ -14,5 +14,21 @@ Go 1.25 will require macOS 12 Monterey or later. ### WebAssembly {#wasm} + +The `go:wasmexport` directive is added for Go programs to export functions to the WebAssembly host. + +On WebAssembly System Interface Preview 1 (`GOOS=wasip1, GOARCH=wasm`), Go 1.24 supports +building a Go program as a +[reactor/library](https://github.com/WebAssembly/WASI/blob/63a46f61052a21bfab75a76558485cf097c0dbba/legacy/application-abi.md#current-unstable-abi), +by specifying the `-buildmode=c-shared` build flag. + + +More types are now permitted as argument or result types for `go:wasmimport` functions. +Specifically, `bool`, `string`, `uintptr`, and pointers to certain types are allowed +(see the [proposal](/issue/66984) for detail), +along with 32-bit and 64-bit integer and float types, and `unsafe.Pointer`, which +are already allowed. +These types are also permitted as argument or result types for `go:wasmexport` functions. + The support files for WebAssembly have been moved to `lib/wasm` from `misc/wasm`. diff --git a/doc/next/9-todo.md b/doc/next/9-todo.md index 626ca9161b..28f23a0448 100644 --- a/doc/next/9-todo.md +++ b/doc/next/9-todo.md @@ -4,7 +4,6 @@ accepted proposal https://go.dev/issue/26232 (from https://go.dev/cl/605256, htt accepted proposal https://go.dev/issue/48429 (from https://go.dev/cl/521958, https://go.dev/cl/521959, https://go.dev/cl/534817, https://go.dev/cl/563175, https://go.dev/cl/613095, https://go.dev/cl/614555, https://go.dev/cl/630695) - cmd/go support for tracking tool dependencies in go.mod is tracked in proposal 48429 itself as a release blocker accepted proposal https://go.dev/issue/50603 (from https://go.dev/cl/595376, https://go.dev/cl/596035, https://go.dev/cl/609155, https://go.dev/cl/611916, https://go.dev/cl/627295) - cmd/go support for stamping pseudo-version in go build is tracked in proposal 50603 itself as a release blocker accepted proposal https://go.dev/issue/64127 (from https://go.dev/cl/597576) - mentioning the new vet check to report invalid Go versions in build tags is tracked in proposal 64127 itself as a release blocker -accepted proposal https://go.dev/issue/65199 (from CL 603055, https://go.dev/cl/603836, https://go.dev/cl/604316, https://go.dev/cl/604975, https://go.dev/cl/606855, https://go.dev/cl/611315) - the new go:wasmexport directive is now tracked in proposal 65199 itself as a release blocker accepted proposal https://go.dev/issue/66387 (from https://go.dev/cl/569955) - extending the copylock analyzer in cmd/vet is now tracked in proposal 66387 itself as a release blocker accepted proposal https://go.dev/issue/69290 (from https://go.dev/cl/613095) - cmd/go caching link output binaries is now tracked in proposal 69290 itself as a release blocker accepted proposal https://go.dev/issue/69393 (from https://go.dev/cl/630775) - automatic crypto/tls.CurvePreferences ordering is now tracked in proposal 69393 itself as a release blocker @@ -13,7 +12,6 @@ accepted proposal https://go.dev/issue/69393 (from https://go.dev/cl/630775) - a