From ea14173c886886d8b9f344d33378f7141279c665 Mon Sep 17 00:00:00 2001 From: devsnek Date: Sun, 31 Oct 2021 13:12:24 -0500 Subject: [PATCH] expose `wasm` intrinsics using `target_family = "wasm"` (#1241) --- crates/core_arch/src/mod.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/crates/core_arch/src/mod.rs b/crates/core_arch/src/mod.rs index 861b2c616c6f9..b2d9b5baf2e95 100644 --- a/crates/core_arch/src/mod.rs +++ b/crates/core_arch/src/mod.rs @@ -173,6 +173,17 @@ pub mod arch { pub use crate::core_arch::wasm32::*; } + /// Platform-specific intrinsics for the `wasm` target family. + /// + /// See the [module documentation](../index.html) for more details. + #[cfg(any(target_family = "wasm", doc))] + #[doc(cfg(target_family = "wasm"))] + #[stable(feature = "simd_wasm32", since = "1.33.0")] + pub mod wasm { + #[stable(feature = "simd_wasm32", since = "1.33.0")] + pub use crate::core_arch::wasm32::*; + } + /// Platform-specific intrinsics for the `mips` platform. /// /// See the [module documentation](../index.html) for more details. @@ -240,8 +251,8 @@ mod aarch64; #[doc(cfg(any(target_arch = "arm")))] mod arm; -#[cfg(any(target_arch = "wasm32", target_arch = "wasm64", doc))] -#[doc(cfg(any(target_arch = "wasm32", target_arch = "wasm64")))] +#[cfg(any(target_family = "wasm", doc))] +#[doc(cfg(target_family = "wasm"))] mod wasm32; #[cfg(any(target_arch = "mips", target_arch = "mips64", doc))]