From 2c0b52eec6c80553daa984b8e4dc2025354852a1 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Fri, 27 Oct 2023 21:53:31 +0100 Subject: [PATCH] Add a comment about how wasmtime-c-api is linked by cargo --- lib/binding_rust/wasm_language.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/binding_rust/wasm_language.rs b/lib/binding_rust/wasm_language.rs index d6c77843..7b719c1e 100644 --- a/lib/binding_rust/wasm_language.rs +++ b/lib/binding_rust/wasm_language.rs @@ -4,6 +4,8 @@ pub use wasmtime; #[cfg(feature = "wasm")] pub fn test() { + // Force Cargo to include wasmtime-c-api as a dependency of this crate, + // even though it is only used by the C code. wasmtime_c_api::wasm_engine_new(); }