chore: add Nix devshell for aarch64-linux-android cross-compilation#388
Draft
agentotto[bot] wants to merge 2 commits into
Draft
chore: add Nix devshell for aarch64-linux-android cross-compilation#388agentotto[bot] wants to merge 2 commits into
agentotto[bot] wants to merge 2 commits into
Conversation
ff09ade to
b114854
Compare
a98431b to
3726bd0
Compare
3726bd0 to
dea5100
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a minimal Nix flake for WalletKit development and Android
libwalletkit.sobuilds without Docker orcross-rs.The flake provides:
defaultdev shell: pinned Rust toolchain,curl, andgitfor host developmentandroiddev shell: full Android cross-compilation environment foraarch64-linux-androidx86_64-linux,aarch64-darwin, andx86_64-darwinrust-toolchain.tomlviaoxalica/rust-overlay27.2.12479018) viaandroidenv.composeAndroidPackagestoolchains/llvm/prebuilt/linux-x86_64/bintoolchains/llvm/prebuilt/darwin-x86_64/bincurlforwalletkit-db/build.rsSQLite3MC downloadsaarch64-linux-android.cargo/config.tomlNo existing CI workflows or
Cross.tomlare modified.Usage
For a pinned Rust host-development environment:
For Android cross-compilation:
nix develop .#androidThen build the mobile release artifact:
Or use the helper:
Verification
In the workspace I verified:
The shell evaluates for all configured systems.
I could not complete a real
nix develop .#android --command cargo build ...in this workspace because the provided pod isaarch64-linux, while this flake intentionally provides the requestedx86_64-linuxand Darwin shells. Attempting to realize the x86_64 shell on the aarch64 pod fails withExec format errorwhile running x86_64 Nix builders. This should be validated on an amd64 Linux runner or a supported macOS machine.Next steps
cross-rspath incrementally.