-
Notifications
You must be signed in to change notification settings - Fork 865
How to generate standalone binary from .wasmu
file
#5422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Update: I converted the
This makes sense if |
Hello, thanks for the report. I'll investigate this as soon as possible. |
Currently, |
Thanks @xdoardo. As I showed in #5422 (comment), using a What am I missing? I'd appreciate some orientation. |
Hey so I ran into the same problem, and did some digging. I've nailed down to this section of code, which I think might be the reason: wasmer/lib/cli/src/commands/create_exe.rs Lines 1079 to 1095 in aa2024f
That being said, I have to mentioned that I ran into this issue using an older wasmer version(a fork from wasmer 4.3.7). It seems @darccio was also using an older version (5.0.4). In current tip of wasmer, the bug cannot be reproduced, I guess maybe the reason is that the |
Summary
By default, it seems that
wasmer compile
generates a.wasmu
file. According to #3014 (comment), it's already contains compiled machine instructions for the target arch.From the same thread, it seems implied that using
create-exe
with a.wasmu
should generate a standalone binary with Wasmer runtime embedded on it and the module converted and linked as object. This would seem to align with a old blog post in wasmer.io.When I run the following instructions, I get an error about a bad magic number.
Does
create-exe
supportscompile
output files or should we use another tool to generate a.wasm
file - likewat2wasm
- to feed it tocreate-exe
?Thanks!
Additional details
Wasmer version:
wasmer 5.0.4
hello-world.wat
:The text was updated successfully, but these errors were encountered: