Building
How to build each part of Auriya. The Rust build has a repo-specific gotcha you must know before running any cargo command.
Traced to commit 10fe7c6:
Cargo.toml,
.cargo/config.toml,
android/*/build.gradle.kts, website/package.json. The authoritative CI recipe
is CI/CD workflows.
Cargo is pinned to cross-compile for Android
Section titled “Cargo is pinned to cross-compile for Android”.cargo/config.toml sets:
[build]target = "aarch64-linux-android"
[target.aarch64-linux-android]linker = "/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang"runner = "bash .cargo/adb-runner.sh"Consequences for a first-time contributor:
cargo builddoes not build for your host. It cross-compiles anaarch64-linux-androidbinary and needs an Android NDK at the hardcoded path/opt/android-ndk. Without that NDK, the build fails at the linker.cargo testruns on a device. Therunnerships each test binary to a connected device over adb (.cargo/adb-runner.sh) — tests execute on real hardware, not your workstation. Several tests (pid_tracker,cmd_writer) assume a real Android/Linux environment.- CI installs the NDK and uses
cargo ndkrather than relying on this hardcoded path — see below.
To build for your host instead (e.g. to run a unit test locally), override the target explicitly:
cargo build --target x86_64-unknown-linux-gnucargo test --target x86_64-unknown-linux-gnu(Device-only tests will not be meaningful on the host.)
Rust — the CI recipe (reproducible)
Section titled “Rust — the CI recipe (reproducible)”The exact command CI uses to produce the shipped binaries (CI/CD → rust-binary):
# Requires: Android NDK, Rust nightly with target aarch64-linux-android,# rust-src, and cargo-ndk.cargo ndk -t aarch64-linux-android --platform 26 -- build --release --bin auriya --bin auriyactlcargo ndk supplies the NDK toolchain paths, sidestepping the hardcoded
/opt/android-ndk in .cargo/config.toml. The release profile is size-optimized
(Cargo.toml): opt-level = "z", lto = "fat", codegen-units = 1,
panic = "abort", strip = true.
Lints and formatting
Section titled “Lints and formatting”The repo enforces strict lints (Cargo.toml [lints]):
cargo fmt --all -- --check # formattingcargo clippy --all-targets --all-features -- -D warnings # deny-level lintsclippy groups all/correctness/suspicious/perf/complexity are set to
deny; style is warn. Rust unsafe_op_in_unsafe_fn and unused_must_use
are denied.
Android
Section titled “Android”Two Gradle modules produce the APKs (android/app, android/service;
minSdk = 30 / Android 11, android/app/build.gradle.kts:54). Signed release
builds need android/signing.properties (template:
android/signing.properties.example — never commit real keys):
cd android./gradlew build # all modules, debug + release./gradlew :app:assembleRelease :service:assembleRelease # what CI builds./gradlew test # JVM unit testsDocumentation site
Section titled “Documentation site”The website uses Bun (website/bun.lock, website/package.json):
cd websitebun installbun run start # local dev server with live reloadbun run build # static production build into website/buildFull pipeline
Section titled “Full pipeline”The complete trigger, job DAG, per-step commands, artifacts, secrets, cache keys, failure behavior, and external side effects are documented in CI/CD workflows.