From 734e694cf312fba9b980d848ee44609d68a71dd7 Mon Sep 17 00:00:00 2001 From: Demetrius Kanios Date: Mon, 24 Aug 2026 21:20:01 -0700 Subject: [PATCH] Don't force link `cabi_realloc` on non-Wasm builds. --- crates/guest-rust/src/rt/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/guest-rust/src/rt/mod.rs b/crates/guest-rust/src/rt/mod.rs index 349f8006a..b9dbe2946 100644 --- a/crates/guest-rust/src/rt/mod.rs +++ b/crates/guest-rust/src/rt/mod.rs @@ -122,7 +122,7 @@ mod wit_bindgen_cabi_realloc; /// /// For more information about this see `./ci/rebuild-libwit-bindgen-cabi.sh`. pub fn maybe_link_cabi_realloc() { - #[cfg(any(target_env = "p1", target_env = ""))] + #[cfg(all(target_family = "wasm", any(target_env = "p1", target_env = "")))] { unsafe extern "C" { fn cabi_realloc(