diff --git a/crates/wit/src/token_stream_generator/foreign_mod_generator.rs b/crates/wit/src/token_stream_generator/foreign_mod_generator.rs index 4f5f678..2a8e28a 100644 --- a/crates/wit/src/token_stream_generator/foreign_mod_generator.rs +++ b/crates/wit/src/token_stream_generator/foreign_mod_generator.rs @@ -120,7 +120,9 @@ fn generate_wrapper_functions(extern_item: &fce_ast_types::AstExternModItem) -> #[cfg(target_arch = "wasm32")] #[doc(hidden)] #[allow(clippy::all)] - #visibility unsafe fn #func_name(#(#arg_names: #arg_types), *) #return_type { + #visibility fn #func_name(#(#arg_names: #arg_types), *) #return_type { + unsafe { + // make complex arguments manually droppable #arg_transforms @@ -132,6 +134,8 @@ fn generate_wrapper_functions(extern_item: &fce_ast_types::AstExternModItem) -> // return value conversation from Wasm type to a Rust type #epilog + + } } };