wasmerio / wasmer

🚀 The leading Wasm Runtime supporting WASIX, WASI and Emscripten
https://wasmer.io
MIT License
18.44k stars 789 forks source link

wasmer create-exe fatals with "fatal error: 'wasmer.h' file not found" #3815

Closed AfflatusX closed 3 months ago

AfflatusX commented 1 year ago

Describe the bug

Fresh install of wasmer using curl https://get.wasmer.io -sSfL | sh, download qjs.wasm to test (https://registry-cdn.wapm.io/contents/_/quickjs/0.0.3/build/qjs.wasm)

Run wasmer create-exe ./qjs.wasm -o qjs

Got error:

stderr: /private/var/folders/1z/wbq9qxl11194vpvst1m4wqdh0000gn/T/.tmpO1TSBl/wasmer_main.c:2:10: fatal error: 'wasmer.h' file not found

wasmer create-exe ./qjs.wasm -o qjs

Compiler: cranelift
Target: aarch64-apple-darwin
Using path `/Users/txie/.wasmer/cache/wasmer-darwin-arm64/lib/libwasmer-headless.a` as libwasmer path.
error: linking failed with: stdout:

stderr: /private/var/folders/1z/wbq9qxl11194vpvst1m4wqdh0000gn/T/.tmpO1TSBl/wasmer_main.c:2:10: fatal error: 'wasmer.h' file not found
#include "wasmer.h"
         ^~~~~~~~~~
1 error generated.

I'm using macbook air M2

Steps to reproduce

See above.

Expected behavior

It should produce executable of qjs without error

Actual behavior

Throws error for not finding wasmer.h

Additional context

ptitSeb commented 1 year ago

This functionnality witll use zig to build. Install current version (or at least v0.10) and make sure zig binary are accessible on the PATH and it should work out-of-the-box.

stale[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 months ago

Feel free to reopen the issue if it has been closed by mistake.