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

Unable to run examples on M1 mac: cannot execute binary file #38

Closed
joepio opened this issue Feb 9, 2022 · 2 comments
Closed

Unable to run examples on M1 mac: cannot execute binary file #38

joepio opened this issue Feb 9, 2022 · 2 comments

Comments

@joepio
Copy link

joepio commented Feb 9, 2022

Hi there! This project looks very very cool. However, I've tried running cargo run in the various example_js folders, but none of them seem to work.

target/wasm32-wasi/debug/embed_js_module.wasm: target/wasm32-wasi/debug/embed_js_module.wasm: cannot execute binary file

I also tried embedding some examples' rust code in an existing rust project of mine, and got errors containing:

...out/libquickjs.a, building for macOS-arm64 but attempting to link with file built for unknown-unsupported file format (...)
          Undefined symbols for architecture arm64:
            "_JS_AddModuleExport", referenced fro...

I'm assuming there is no arm64 support yet? Or am I missing some sort of runtime dependency?

@L-jasmine
Copy link
Collaborator

@joepio oh, this is a webassembly project,It need a webassembly runtime. you can read this file, maybe it will let you kown how to use this project.
But wasmedge have some function are unimplemented on macOS. so you need try it on linux.
Do you need a quickjs-rs?

@joepio
Copy link
Author

joepio commented Feb 10, 2022

Thanks for the reply, @L-jasmine

I want to build a plugin ecosystem for a project of mine: Atomic-Server. I’d like users to write plugins in a language that they already use, so I was really interested in WASM. When I saw WasmEdge-QuickJS, I thought: wow, amazing, now they could write in WASM compatible languages AND JS!

So do I need a quickjs-rs? I might need that and wasmedge. Anyways, I think I’ll need to read the docs more carefully. Thanks for you explanation anyway!

@joepio joepio closed this as completed Feb 10, 2022
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

2 participants