Skip to content

Commit ea14173

Browse files
authored
expose wasm intrinsics using target_family = "wasm" (#1241)
1 parent 1181fd4 commit ea14173

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

crates/core_arch/src/mod.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,17 @@ pub mod arch {
173173
pub use crate::core_arch::wasm32::*;
174174
}
175175

176+
/// Platform-specific intrinsics for the `wasm` target family.
177+
///
178+
/// See the [module documentation](../index.html) for more details.
179+
#[cfg(any(target_family = "wasm", doc))]
180+
#[doc(cfg(target_family = "wasm"))]
181+
#[stable(feature = "simd_wasm32", since = "1.33.0")]
182+
pub mod wasm {
183+
#[stable(feature = "simd_wasm32", since = "1.33.0")]
184+
pub use crate::core_arch::wasm32::*;
185+
}
186+
176187
/// Platform-specific intrinsics for the `mips` platform.
177188
///
178189
/// See the [module documentation](../index.html) for more details.
@@ -240,8 +251,8 @@ mod aarch64;
240251
#[doc(cfg(any(target_arch = "arm")))]
241252
mod arm;
242253

243-
#[cfg(any(target_arch = "wasm32", target_arch = "wasm64", doc))]
244-
#[doc(cfg(any(target_arch = "wasm32", target_arch = "wasm64")))]
254+
#[cfg(any(target_family = "wasm", doc))]
255+
#[doc(cfg(target_family = "wasm"))]
245256
mod wasm32;
246257

247258
#[cfg(any(target_arch = "mips", target_arch = "mips64", doc))]

0 commit comments

Comments
 (0)