From 53f6c4b194fc1b406e39880921232bf9d2c01afe Mon Sep 17 00:00:00 2001 From: Andrew Steurer <94206073+asteurer@users.noreply.github.com> Date: Sun, 8 Mar 2026 23:27:19 -0500 Subject: [PATCH] feat: add empty.s to generated directories Signed-off-by: Andrew Steurer <94206073+asteurer@users.noreply.github.com> --- crates/go/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) 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(), + ); } }