]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: document c-shared buildmode for building WASI library/reactor
authorCherry Mui <cherryyz@google.com>
Thu, 5 Dec 2024 18:01:32 +0000 (13:01 -0500)
committerCherry Mui <cherryyz@google.com>
Sat, 7 Dec 2024 00:43:40 +0000 (00:43 +0000)
For #65199.

Change-Id: Icd3ec7cf25c2d381401686333c8aeed8013b3fbd
Reviewed-on: https://go-review.googlesource.com/c/go/+/633418
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/cmd/go/alldocs.go
src/cmd/go/internal/help/helpdoc.go

index ced43b6d5bb8537831e3e11a9aad84c9159c2d11..f227d93de70b7d60201e4ad527d9c72e03a3da71 100644 (file)
 //             Build the listed main package, plus all packages it imports,
 //             into a C shared library. The only callable symbols will
 //             be those functions exported using a cgo //export comment.
-//             Requires exactly one main package to be listed.
+//             On wasip1, this mode builds it to a WASI reactor/library,
+//             of which the callable symbols are those functions exported
+//             using a //go:wasmexport directive. Requires exactly one
+//             main package to be listed.
 //
 //     -buildmode=default
 //             Listed main packages are built into executables and listed
index a64f980e5ee610a5834a041dc0542fe9acebdc83..d373c675f66886be6d6973e851abc9b41332d357 100644 (file)
@@ -769,7 +769,10 @@ are:
                Build the listed main package, plus all packages it imports,
                into a C shared library. The only callable symbols will
                be those functions exported using a cgo //export comment.
-               Requires exactly one main package to be listed.
+               On wasip1, this mode builds it to a WASI reactor/library,
+               of which the callable symbols are those functions exported
+               using a //go:wasmexport directive. Requires exactly one
+               main package to be listed.
 
        -buildmode=default
                Listed main packages are built into executables and listed