diff --git a/Cargo.toml b/Cargo.toml index 5d17850..6097ddc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ members = [ ] [workspace.package] -version = "0.1.0" +version = "0.1.1" edition = "2024" authors = ["Dr. Stefan Flemming "] license = "Apache-2.0" diff --git a/crates/fai-module-sdk-macros/src/lib.rs b/crates/fai-module-sdk-macros/src/lib.rs index 70d08e0..d842ec4 100644 --- a/crates/fai-module-sdk-macros/src/lib.rs +++ b/crates/fai-module-sdk-macros/src/lib.rs @@ -34,6 +34,12 @@ pub fn fai_module(_attrs: TokenStream, input: TokenStream) -> TokenStream { let expanded = quote! { #user_fn + // The WASM glue (wit_bindgen::generate!, Guest impl, export!) + // is only emitted for the wasm32 target. Host builds skip + // it so module crates can use crate-type = ["cdylib", "rlib"] + // and run integration tests via `cargo test` without + // dragging the wit_bindgen runtime onto the host target. + #[cfg(target_arch = "wasm32")] #[doc(hidden)] mod __fai_module_sdk_internal { #![allow(