From c0bdb88b705135171341edeb715c40fb6cea33dc Mon Sep 17 00:00:00 2001 From: Kurdistan Tech Ministry Date: Thu, 23 Apr 2026 03:29:47 +0300 Subject: [PATCH] fix: extern crate alloc when alloc feature active AND (no_std OR wasm32v1-none target) --- serde_core/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serde_core/src/lib.rs b/serde_core/src/lib.rs index 5ad57cdb..24af739e 100644 --- a/serde_core/src/lib.rs +++ b/serde_core/src/lib.rs @@ -102,7 +102,7 @@ //////////////////////////////////////////////////////////////////////////////// -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(all(feature = "alloc", any(not(feature = "std"), target_os = "none")))] extern crate alloc; // Explicitly import core crate for no_std targets (especially wasm32v1-none)