Open tpmccallum opened 4 years ago
I actually ran into the same issue with funcref
vs anyfunc
. Link [1] you mention does include some more updates. For example, get_local
has officially been replaced with local.get
. WebAssemblyStudio uses the old version while my compiler (wasm2wat) uses the newer spec.
I compiled a simple Rust library
The
wat
text representation of this code is as followsPlease note the line
(table (;0;) 1 1 funcref)
Issue
When I build and execute the above wat, I get the following error.
Solution
I note that the WebAssembly
wat
specification has been updated [1], specifically to usefuncref
instead ofanyfunc
for table declaration. The Rust compiler and the wasm to wat conversion toolwabt
[2], that I am using appear to adhere to the newerfuncref
spec.Of course, if I change
funcref
back toanyfunc
then the WebAssemblyStudio IDE will build and run the code.Just wanted to let you know my experience and I am wondering if/when WebAssemblyStudio will adopt the wat spec as per the link below.
Thanks Tim
[1] https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329 [2] https://github.com/WebAssembly/wabt