Simd128 support?
Describe the feature
Hi, I've been playing around with WASM and Zig recently, and I recently tried enabling fixed width simd operation with zig. In the browser it works fine, but when loading the wasm module through nuxt (which I understand uses unwasm) I get this:
[unwasm] Failed to parse WASM module wasm/validator-7175a506b2723ec1.wasm: [unwasm] Failed to parse wasm/validator-7175a506b2723ec1.wasm: Error: Unexpected instruction: 0xfd
From what I understand, 0xfd indicates a simd instruction, is there any movement on getting simd support in unwasm? Thanks.
Additional information
- [ ] Would you be willing to help implement this feature?
Some had been added through this patch: https://github.com/unjs/unwasm/blob/main/patches/%40webassemblyjs__helper-wasm-bytecode.patch
PR welcome to add any missing one
Some had been added through this patch: https://github.com/unjs/unwasm/blob/main/patches/%40webassemblyjs__helper-wasm-bytecode.patch
PR welcome to add any missing one
I'll see what I can do
Hey @pi0 I think I have a patch: https://github.com/juls0730/unwasm I'm going to try and test it before I make a PR.
Hm, upon further investigation, it may be more difficult than simply adding the instructions. In that patch I have above the number of arguments on a few of the instructions is wrong, but if I change around the values, it errors on v128.const and I think this is because the leb library cannot read u128 values, which the v128.const requires. I think for now I'll just continue not using simd on the server. Let me know if I can be of any use