Skip to content
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

wasmer create-exe generates broken executable. #5450

Open
Magicloud opened this issue Mar 4, 2025 · 0 comments
Open

wasmer create-exe generates broken executable. #5450

Magicloud opened this issue Mar 4, 2025 · 0 comments

Comments

@Magicloud
Copy link

Describe the bug

wasmer -vV; rustc -vV

wasmer 5.0.4 (??????? 2025-02-17)
binary: wasmer-cli
commit-hash:
commit-date: 2025-02-17
host: x86_64-unknown-linux-gnu
compiler: singlepass,cranelift,llvm
c_api backend:

rustc 1.86.0-beta.4 (61e1603ac 2025-03-02)
binary: rustc
commit-hash: 61e1603ac7b9162968f55a4e9f6f136c0e1bf68a
commit-date: 2025-03-02
host: x86_64-unknown-linux-gnu
release: 1.86.0-beta.4
LLVM version: 19.1.7

Steps to reproduce

  1. Create demo Rust source:
    fn main() {
        println!("Hello, world!");
    }
    
  2. rustc test.rs --target wasm32-wasip1
  3. wasmer create-exe -o test test.wasm -v
    Compiler: cranelift
    Target: x86_64-unknown-linux-gnu
    Using path `/home/magicloud/.wasmer/cache/wasmer-linux-amd64/lib/libwasmer-headless.a` as libwasmer path.
    ✔ Native executable compiled successfully to `test`.
    
  4. ./test
    Failed to create module from atom "test"
    Error len: `65`
    incompatible binary: The provided bytes are not wasmer-universal
    
  5. Create-exe with --llvm failed the same way

Expected behavior

Expected to get an executable output "Hello, world!".

Actual behavior

The executable somehow seems broken.

Additional context

I saw another issue mentioned that cranelift worked for him but not llvm. But for me, neither works. So I start a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant