Stream: wasm

Topic: ✔ Compile WAT to Wasm with Wasm GC


view this post on Zulip Dominic Elm (Jan 23 2024 at 14:14):

What compiler allows me to compile WAT which uses some of the new Wasm GC instructions like array.new to the Wasm binary format? I tried wasm-tools but that doesn't seem to work, neither does wat2wasm.

Here's the code I am trying to compile:

(module
  (type $vec (array i32))
  (func (export "foo") (result (ref $vec))
      (array.new_default $vec (i32.const 3))
  )
)

view this post on Zulip Dominic Elm (Jan 23 2024 at 14:29):

Ok, I think I managed to compile it with wasm-tool, except that wasm-tools print cannot parse the binary format. Seems to be a bug.

view this post on Zulip Dominic Elm (Jan 23 2024 at 14:33):

Ah never mind. I just updated and it now works :tada:

view this post on Zulip Notification Bot (Jan 23 2024 at 14:33):

Dominic Elm has marked this topic as resolved.


Last updated: Dec 23 2024 at 12:05 UTC