-
Notifications
You must be signed in to change notification settings - Fork 824
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
Run wasmer on iOS device #2760
Comments
I'm trying to do the same and got similar errors. So using
In this case, I think the Running a code in iOS Simulator has many differences between running a code in a real device, even in the controlled development environment. |
3185: Fix `wasmer compile` command for non-x86 target r=syrusakbary a=flfymoss <!-- Prior to submitting a PR, review the CONTRIBUTING.md document for recommendations on how to test: https://github.com/wasmerio/wasmer/blob/master/CONTRIBUTING.md#pull-requests --> # Description <!-- Provide details regarding the change including motivation, links to related issues, and the context of the PR. --> Currently, `wasmer compile` command with specifying non-x86 (e.g. `aarch64-apple-darwin`) target doesn't work. This change fixes the issue by not SSE2 to be force added for non-x86 targets. (Codes are ported from https://github.com/wasmerio/wasmer/blob/8a6c98702f1b8b63f5ab3d1b8c094959dd325afe/lib/cli/src/commands/create_obj.rs#L80 and https://github.com/wasmerio/wasmer/blob/d4a888abed6d877d46bf040a932e693ab39940b9/lib/cli/src/commands/create_exe.rs#L151 ) Possibly relates #2760 (comment) ## Demo ### Before ```sh $ wasmer compile hello.wasm -o hello.wasmu Compiler: cranelift Target: aarch64-apple-darwin ✔ File compiled successfully to `hello.wasmu`. $ wasmer run hello.wasmu Hello World! $ wasmer compile --target aarch64-apple-darwin -o hello.wasmu hello.wasm Compiler: cranelift Target: aarch64-apple-darwin ✔ File compiled successfully to `hello.wasmu`. $ wasmer run hello.wasmu error: failed to run `hello.wasmu` │ 1: failed to instantiate WASI module ╰─▶ 2: missing required CPU features: "EnumSet(SSE2)" ``` ### After ```sh $ wasmer compile --target aarch64-apple-darwin -o hello.wasmu hello.wasm Compiler: cranelift Target: aarch64-apple-darwin ✔ File compiled successfully to `hello.wasmu`. $ wasmer run hello.wasmu Hello World! ``` # Review - [ ] Add a short description of the change to the CHANGELOG.md file Co-authored-by: Go Murakami <[email protected]>
3185: Fix `wasmer compile` command for non-x86 target r=syrusakbary a=flfymoss <!-- Prior to submitting a PR, review the CONTRIBUTING.md document for recommendations on how to test: https://github.com/wasmerio/wasmer/blob/master/CONTRIBUTING.md#pull-requests --> # Description <!-- Provide details regarding the change including motivation, links to related issues, and the context of the PR. --> Currently, `wasmer compile` command with specifying non-x86 (e.g. `aarch64-apple-darwin`) target doesn't work. This change fixes the issue by not SSE2 to be force added for non-x86 targets. (Codes are ported from https://github.com/wasmerio/wasmer/blob/8a6c98702f1b8b63f5ab3d1b8c094959dd325afe/lib/cli/src/commands/create_obj.rs#L80 and https://github.com/wasmerio/wasmer/blob/d4a888abed6d877d46bf040a932e693ab39940b9/lib/cli/src/commands/create_exe.rs#L151 ) Possibly relates #2760 (comment) ## Demo ### Before ```sh $ wasmer compile hello.wasm -o hello.wasmu Compiler: cranelift Target: aarch64-apple-darwin ✔ File compiled successfully to `hello.wasmu`. $ wasmer run hello.wasmu Hello World! $ wasmer compile --target aarch64-apple-darwin -o hello.wasmu hello.wasm Compiler: cranelift Target: aarch64-apple-darwin ✔ File compiled successfully to `hello.wasmu`. $ wasmer run hello.wasmu error: failed to run `hello.wasmu` │ 1: failed to instantiate WASI module ╰─▶ 2: missing required CPU features: "EnumSet(SSE2)" ``` ### After ```sh $ wasmer compile --target aarch64-apple-darwin -o hello.wasmu hello.wasm Compiler: cranelift Target: aarch64-apple-darwin ✔ File compiled successfully to `hello.wasmu`. $ wasmer run hello.wasmu Hello World! ``` # Review - [ ] Add a short description of the change to the CHANGELOG.md file Co-authored-by: Go Murakami <[email protected]>
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. |
Feel free to reopen the issue if it has been closed by mistake. |
how to read directly |
In version 2.1.0, wasmer added iOS support.
I can run DylibExample on the IOS simulator and get the correct results.But when I was running on the real machine, I encountered a problem:
Because I need to compile dylib that can be run by the real machine
, I changed the script "Compile .wasm to .dylib" to this:
It can be compiled and run normally, but an error occurred. The log is as follows:
The text was updated successfully, but these errors were encountered: