diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index ced43b6d5bb853..f227d93de70b7d 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -2210,7 +2210,10 @@ // 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 diff --git a/src/cmd/go/internal/help/helpdoc.go b/src/cmd/go/internal/help/helpdoc.go index a64f980e5ee610..d373c675f66886 100644 --- a/src/cmd/go/internal/help/helpdoc.go +++ b/src/cmd/go/internal/help/helpdoc.go @@ -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