binaryen.js
binaryen.js copied to clipboard
Module#getFeatures() returns 0 for module using SIMD128 and bulk memory ops
There seems to be an issue with the Module#getFeatures()
call when run on a module that uses features beyond the WebAssembly MVP scope. In my case, I am using SIMD128 and bulk memory optimizations. This is confirmed when I run Module#validate()
, which interestingly prints out errors like:
[wasm-validator error in function xyz] unexpected false: SIMD operation (SIMD is disabled), on ...
Note that I am using binaryen.js inside a node.js script (a mocha test script that runs some smoke tests on my WebAssembly module).
Does this happen when loading an existing module, or when creating a new module? In the former case it might be that loading a module does not yet detect the features used, and that another call of setFeatures
is necessary. Just a guess, though.