diff --git a/crates/go/src/lib.rs b/crates/go/src/lib.rs index 08fb05577..1550c0c9a 100644 --- a/crates/go/src/lib.rs +++ b/crates/go/src/lib.rs @@ -956,6 +956,14 @@ import ( .as_bytes(), ), ); + + files.push( + &format!("{prefix}{name}/empty.s"), + r#"// This file exists for testing this package without WebAssembly, +// allowing empty function bodies with a //go:wasmimport directive. +// See https://pkg.go.dev/cmd/compile for more information."# + .as_bytes(), + ); } }