This means that Wasmer can not be swapped in in place of other libraries adhering to the Wasm C API (e.g. Wasmtime). The following error is produced when compiling:
error: use of undeclared identifier 'WASM_EXTERNREF'; did you mean 'WASM_ANYREF'?
if (results->data[i].kind == WASM_EXTERNREF) return ERR_INVALID_DATA;
^~~~~~~~~~~
WASM_ANYREF
Steps to reproduce
Compile using Wasmer via the Wasm C API. Make use of WASM_EXTERNREF.
Expected behavior
Program compiles using WASM_EXTERNREF.
Actual behavior
The WASM_EXTERNREF enum is undefined.
error: use of undeclared identifier 'WASM_EXTERNREF'; did you mean 'WASM_ANYREF'?
if (results->data[i].kind == WASM_EXTERNREF) return ERR_INVALID_DATA;
^~~~~~~~~~~
WASM_ANYREF
Describe the bug
Wasmer does not use Wasm value types as defined by the Wasm C API.
The Wasm C API defines value types as follows (source):
Wasmer uses enum
WASM_ANYREF
instead ofWASM_EXTERNREF
as follows:This means that Wasmer can not be swapped in in place of other libraries adhering to the Wasm C API (e.g. Wasmtime). The following error is produced when compiling:
Steps to reproduce
Compile using Wasmer via the Wasm C API. Make use of
WASM_EXTERNREF
.Expected behavior
Program compiles using
WASM_EXTERNREF
.Actual behavior
The
WASM_EXTERNREF
enum is undefined.