wabt.js
wabt.js copied to clipboard
Reference types problem: not enabled?
Trying to make trivial ref types detector code run via wabt.js, encountering an issue:
import Wabt from 'wabt'
const wabt = await Wabt()
const wasmModule = wabt.parseWat('inline',`(func (ref.null func) (drop))`, {
reference_types: true
})
const binary = wasmModule.toBinary({
log: true,
canonicalize_lebs: true,
relocatable: false,
write_debug_names: false,
})
Getting inline:5:5: error: opcode not allowed: ref.null ref.null func.
What's the issue? Running in node fine...