When trying to run Wasm-R3-Bench on WAMR we face the following issue for some of the modules:
WASM module load failed: a module with WASI apis must export memory by default
After some digging around, we found that disabling WASI libc and using WAMR's built-in libc solves this issue. This is achieved by compiling the runtime (iwasm in our case) using the following config options:
cmake .. -DWAMR_BUILD_LIBC_WASI=0 -DWAMR_BUILD_LIBC_BUILTIN=1
And the resulting iwasm binary is able to run the full suite.
Another approach we tried was to modify the Wasm-R3-Bench binaries that had trouble running by adding the following line:
(export "memory" (memory 0))
which also solved the issue.
We don't like the second approach though, because then we would be running binaries that differ from Wasm-R3-Bench, which could make our results less comparable to prior or future results.
On the other hand, we are unsure of the implications of using WAMR's built-in libc. Any thoughts?
When trying to run Wasm-R3-Bench on WAMR we face the following issue for some of the modules:
After some digging around, we found that disabling WASI libc and using WAMR's built-in libc solves this issue. This is achieved by compiling the runtime (
iwasmin our case) using the following config options:And the resulting
iwasmbinary is able to run the full suite.Another approach we tried was to modify the Wasm-R3-Bench binaries that had trouble running by adding the following line:
which also solved the issue.
We don't like the second approach though, because then we would be running binaries that differ from Wasm-R3-Bench, which could make our results less comparable to prior or future results.
On the other hand, we are unsure of the implications of using WAMR's built-in libc. Any thoughts?