WasmFeatures "reference_types" does not work anymore
Horcrux7 opened this issue · 1 comments
Horcrux7 commented
Reference Types are now default in WABT. But in the nightly build of wabt.js it does not work anymore for parseWat. I receive the follow error multiple times:
test.wat:41:22: error: value type not allowed: externref
(param $this externref)
^^^^^^^^^
- It work with a nightly build from wat2wasm.
- It work latest version 1.024 of wabt.js.
- But it does not work with wabt@nightly
My code look like:
#!/usr/bin/env node
var fs = require('fs');
require("wabt")().then(wabt => {
var filename = 'test.wat';
var text = fs.readFileSync(filename, "utf8");
var features = {'sat_float_to_int':true, 'sign_extension':true, 'exceptions':true, 'reference_types':true, 'gc':true};
var wasm = wabt.parseWat(filename, text, features);
...
});
marcusb commented
The issue was that reference_types
requires bulk_memory
, so you would have had to enable that one too. That should be fixed now (as of 1.0.32), both features are now enabled by default.