File tree Expand file tree Collapse file tree 4 files changed +21
-11
lines changed Expand file tree Collapse file tree 4 files changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -39,10 +39,6 @@ case ${TARGET} in
3939 * android* )
4040 export STDSIMD_DISABLE_ASSERT_INSTR=1
4141 ;;
42- wasm32* )
43- # export RUSTFLAGS="${RUSTFLAGS} -C target-feature=+simd128"
44- ;;
45-
4642 * )
4743 ;;
4844esac
@@ -63,13 +59,17 @@ cargo_test() {
6359cargo_test
6460cargo_test " --release"
6561
66- # Test x86 targets compiled with AVX .
62+ # Test targets compiled with extra features .
6763case ${TARGET} in
6864 x86* )
6965 RUSTFLAGS=" ${RUSTFLAGS} -C target-feature=+avx"
7066 export STDSIMD_DISABLE_ASSERT_INSTR=1
7167 cargo_test " --release"
7268 ;;
69+ wasm32-unknown-unknown* )
70+ # export RUSTFLAGS="${RUSTFLAGS} -C target-feature=+simd128"
71+ cargo_test " --release --features=wasm32_simd128"
72+ ;;
7373 * )
7474 ;;
7575esac
Original file line number Diff line number Diff line change 11//! WASM32 intrinsics
22
3- #[ macro_use]
4- #[ cfg( not( test) ) ]
5- mod simd128;
6- #[ cfg( test) ]
7- pub mod simd128;
8- pub use self :: simd128:: * ;
3+ cfg_if ! {
4+ if #[ cfg( feature = "wasm_simd128" ) ] {
5+ #[ macro_use]
6+ #[ cfg( not( test) ) ]
7+ mod simd128;
8+ #[ cfg( test) ]
9+ pub mod simd128;
10+ pub use self :: simd128:: * ;
11+ }
12+ }
913
1014#[ cfg( test) ]
1115use stdsimd_test:: assert_instr;
Original file line number Diff line number Diff line change @@ -31,3 +31,5 @@ strict = []
3131# Internal-usage only: enables only those intrinsics supported by Intel's
3232# Software Development Environment (SDE).
3333intel_sde = []
34+ # Enables wasm simd128 intrinsics
35+ wasm_simd128 = []
Original file line number Diff line number Diff line change @@ -37,3 +37,7 @@ path = "../../examples/hex.rs"
3737name = " wasm"
3838crate-type = [" cdylib" ]
3939path = " ../../examples/wasm.rs"
40+
41+ [features ]
42+ default = []
43+ wasm_simd128 = [" coresimd/wasm_simd128" ]
You can’t perform that action at this time.
0 commit comments