File tree 4 files changed +21
-11
lines changed
4 files changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -39,10 +39,6 @@ case ${TARGET} in
39
39
* android* )
40
40
export STDSIMD_DISABLE_ASSERT_INSTR=1
41
41
;;
42
- wasm32* )
43
- # export RUSTFLAGS="${RUSTFLAGS} -C target-feature=+simd128"
44
- ;;
45
-
46
42
* )
47
43
;;
48
44
esac
@@ -63,13 +59,17 @@ cargo_test() {
63
59
cargo_test
64
60
cargo_test " --release"
65
61
66
- # Test x86 targets compiled with AVX .
62
+ # Test targets compiled with extra features .
67
63
case ${TARGET} in
68
64
x86* )
69
65
RUSTFLAGS=" ${RUSTFLAGS} -C target-feature=+avx"
70
66
export STDSIMD_DISABLE_ASSERT_INSTR=1
71
67
cargo_test " --release"
72
68
;;
69
+ wasm32-unknown-unknown* )
70
+ # export RUSTFLAGS="${RUSTFLAGS} -C target-feature=+simd128"
71
+ cargo_test " --release --features=wasm32_simd128"
72
+ ;;
73
73
* )
74
74
;;
75
75
esac
Original file line number Diff line number Diff line change 1
1
//! WASM32 intrinsics
2
2
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
+ }
9
13
10
14
#[ cfg( test) ]
11
15
use stdsimd_test:: assert_instr;
Original file line number Diff line number Diff line change @@ -31,3 +31,5 @@ strict = []
31
31
# Internal-usage only: enables only those intrinsics supported by Intel's
32
32
# Software Development Environment (SDE).
33
33
intel_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"
37
37
name = " wasm"
38
38
crate-type = [" cdylib" ]
39
39
path = " ../../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