Building Chuchu requires two steps: compiling the native JNI library written in Zig (which links libssh2, libghostty, and Mosh), then assembling the Android APK with Gradle. The Nix flake bundles every dependency automatically; the manual path requires you to install the Android NDK and Zig separately before running the same underlying commands.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jossephus/chuchu/llms.txt
Use this file to discover all available pages before exploring further.
Choose a setup path
- With Nix
- Manual setup
The Nix flake pins every dependency — Android SDK, NDK 29, build tools 35, and Zig — so you get a reproducible environment with a single command.
Enter the dev shell
Run
nix develop from the repository root. This pulls in the Android SDK, NDK, platform tools, and the correct Zig version automatically.Build the native JNI library
make build compiles the Zig source with ReleaseSmall optimizations and places libchuchu_jni.so in the correct jniLibs directory.Makefile targets
TheMakefile at the repository root provides two convenience targets.
| Target | What it does |
|---|---|
make build | Runs cd zig-src && zig build -Doptimize=ReleaseSmall jni |
make app | Assembles the APK, installs it with ./gradlew installDebug, and launches MainActivity via adb shell am start |
Environment variables
NDK location (required)
| Variable | Description |
|---|---|
ANDROID_NDK_HOME | Path to your Android NDK installation |
ANDROID_NDK_ROOT | Alternative variable — the build system accepts either |
Release signing (optional)
These variables are read byandroid/app/build.gradle.kts when building a signed release APK. Leave them unset for debug builds.
| Variable | Description |
|---|---|
KEYSTORE_PASSWORD | Password for the key.jks keystore file |
KEY_ALIAS | Key alias within the keystore |
KEY_PASSWORD | Password for the specific key |
Version numbering (optional)
The Gradle build computesversionCode as MAJOR * 10000 + MINOR * 100 + PATCH. If these are unset the defaults (0.2.0) are used.
| Variable | Default |
|---|---|
VERSION_MAJOR | 0 |
VERSION_MINOR | 2 |
VERSION_PATCH | 0 |
Only the
arm64-v8a (aarch64) ABI is supported. The abiFilters in build.gradle.kts explicitly lists only arm64-v8a, and the Zig build targets aarch64-linux-android exclusively. 32-bit and x86 devices are not supported.