4 ms·
To compile code to WebAssembly with SIMD instructions, just use the generic+simd128 CPU target: zig cc -Ofast --target=wasm32-wasi -mcpu=generic+simd128 e
by jedisct1 5y ago
To compile code to WebAssembly with SIMD instructions, just use the generic+simd128 CPU target:
zig cc -Ofast --target=wasm32-wasi -mcpu=generic+simd128 example.c
zig c++ -Ofast --target=wasm32-wasi -mcpu=generic+simd128 example.cpp
Or with a build file:
zig build -Drelease-fast -Dtarget=wasm32-wasi -Dcpu=generic+simd128