`(ref null extern)` fails parsing
According to the WASM spec, externref is an alias for (ref null extern).
While externref works well in .wat files (for wat2wasm), (ref null extern) doesn't seem to be supported, even with --enable-all:
error: unexpected token null, expected a numeric index or a name
The same error appears if I try to parse (ref extern) (without the null).
Hey Eli! Long time now see. Hope you are doing well.
Sadly, wabt is currently a little behind on reference types and GC proposals. It could be that fixing that alias would be easy enough, but there are whole queue of GC changes in open PRs right now (thanks to @zherczeg). Imagine this will be fixed when they (eventually) land.
👋 Sam, great to be in touch again.
Yes, I noticed a general lag around GC-related stuff and other new things from WASM 3.0
Would you say that bytecodealliance/wasm-tools is more up-to-date these days?
👋 Sam, great to be in touch again.
Yes, I noticed a general lag around GC-related stuff and other new things from WASM 3.0
Would you say that bytecodealliance/wasm-tools is more up-to-date these days?
Yes, absolutely. I'm afraid wabt gets very little love these days. See #2348
@eliben you can use the branches with GC support: https://github.com/zherczeg/wabt/tree/gc_tests
It would be good to have a WebAssembly 3.0 compatible branch of wabt somewhere even if it is non official.