nathanprat opened issue #5852:
Hello,
My goal is to run a Substrate client[Integritee to be precise] on Android(and soon iOs).
The issue is thatintegritee-cli
pulls a lot of dependencies, including this crate.
Unfortunately, it does not compile on Android Emulator.See this for a bit more context.
I know these targets are not supposed to be supported, but as I created a fork (and used a cargo
[patch]
), I thought I might as well share it.Benefit
Allow this crate to compile on Android Emulator(and Android aarch64).
While I'm at it, I can probably add iOs Simulator and aarch64 too?Implementation
I have started a branch (based on
v5
b/c of transitive deps) here: https://github.com/Interstellar-Network/wasmtime/tree/v5-fix-android-emulator-build-for-substrate-client [still WIP, CI pass for Android but breaks for other targets... I need to improve the#[cfg]
)Note: this project is way beyond my Rust skills so:
- I have simply added what I needed to make it compile; but no idea if it would run
- -> the CI is only running
cargo build
Note: the CI job is in main.yml as a starting point; but maybe build.yml would be better?
I did try it there but could not understand how to make qemu work?
afonso360 commented on issue #5852:
We currently have a CI job that checks the aarch64-android build using
cargo-ndk
. Are you encountering issues that it did not catch?
nathanprat commented on issue #5852:
Ah, I did not see it b/c I am using
v5.0.0
b/c of Substrate.But the issue should still be there on master: I want to compile for Android Emulator(ie target
x86_64-linux-android
).
The problem being that it istarget_arch = "x86_64"
+target_os = "linux"
but does not support VTune etc so some#[cfg]
logics fall off.
nathanprat edited a comment on issue #5852:
Ah, I did not see it b/c I am using
v5.0.0
b/c of Substrate.But the issue should still be there on master: I want to compile for Android Emulator(ie target
x86_64-linux-android
).
The problem being that it istarget_arch = "x86_64"
+target_os = "linux"
but does not support VTune etc so some#[cfg]
logics fall off.Edit: this is more a nice-to-have than anything else; ie in prod I only need
aarch64-linux-android
but having the whole stack run an Emulator is definitely easier to dev
jameysharp commented on issue #5852:
When you get to working on iOS, note that, as I understand it, iOS App Store policy prohibits JIT compilers. In theory Wasmtime could work on iOS as long as you have your WebAssembly input available already when compiling your app and precompile it to native code at that point. But as far as I know nobody has yet tried that on iOS.
nathanprat commented on issue #5852:
Thanks for the heads-up!
I am 50% sure that this crate is not used in practice with my use case and could be behind a
feature
. I definitely need to investigate how the dependency tree works
alexcrichton added the wasmtime:platform-support label to Issue #5852.
alexcrichton closed issue #5852:
Hello,
My goal is to run a Substrate client[Integritee to be precise] on Android(and soon iOs).
The issue is thatintegritee-cli
pulls a lot of dependencies, including this crate.
Unfortunately, it does not compile on Android Emulator.See this for a bit more context.
I know these targets are not supposed to be supported, but as I created a fork (and used a cargo
[patch]
), I thought I might as well share it.Benefit
Allow this crate to compile on Android Emulator(and Android aarch64).
While I'm at it, I can probably add iOs Simulator and aarch64 too?Implementation
I have started a branch (based on
v5
b/c of transitive deps) here: https://github.com/Interstellar-Network/wasmtime/tree/v5-fix-android-emulator-build-for-substrate-client [still WIP, CI pass for Android but breaks for other targets... I need to improve the#[cfg]
)Note: this project is way beyond my Rust skills so:
- I have simply added what I needed to make it compile; but no idea if it would run
- -> the CI is only running
cargo build
Note: the CI job is in main.yml as a starting point; but maybe build.yml would be better?
I did try it there but could not understand how to make qemu work?
alexcrichton commented on issue #5852:
I believe that this has since been fixed, so I'm going to close this.
Last updated: Nov 22 2024 at 17:03 UTC