-
Notifications
You must be signed in to change notification settings - Fork 164
Errors while executing hello world example with lucetc-wasi #573
Comments
Hi! lucetc-wasi is the compiler. It cannot run code. The resulting .so (or .dylib) file must be run with lucet-wasi, which is a different tool. |
Wow! Thank you for such a fast answer! I'm reinstalling the Lucet so will try as soon as it is installed. And what about the Wasmtime? Is there a way to pass compiled .so object or similar to avoid compilation by JIT compiler of Wasmtime? |
You're correct, invoking the lucet-wasi tool solves the issue with errors. From what I read in the meantime, I've got an impression that there is no way (at least for now) to use some sort of AOT with the Wasmtime, and I had am impression that Wasmtime is the runtime used by Lucet but after searching I think Wasmtime is used to provide some files for build support. |
Wasmtime includes a cache: https://bytecodealliance.github.io/wasmtime/cli-cache.html - Once code has been cached, it doesn’t need to be recompiled any more. |
Hello!
I've installed Lucet by following documentation here: https://bytecodealliance.github.io/lucet/Compiling-on-Linux.html, and opted for the first installation method.
After that I compiled hello world example using steps described here: https://bytecodealliance.github.io/lucet/Your-first-Lucet-application.html
After compiling hello.wasm file I execute it with Wasmtime (v 0.19.0) and it prints "Hello World" as expected.
However after generating hello.so file and attempting to execute it with lucetc-wasi command I'm getting errors like: unexpected char, unexpected EOF, unexpected token etc.
Example:
1:
2:
3:
Also, I might be going the wrong path here but I'm attempting to use Lucet to produce some sort of AOT file that will skip the compilation performed by Wasmtime. I assumed that Wasmtime should be able to consume hello.so, however this is not the case, it outputs the following:
Could you point me in the right directions here? Am I understanding correctly the Lucet's usage?
Thank you in advance.
The text was updated successfully, but these errors were encountered: