wabt.js icon indicating copy to clipboard operation
wabt.js copied to clipboard

Reference types problem: not enabled?

Open dy opened this issue 3 years ago • 0 comments

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...

dy avatar May 19 '23 03:05 dy