Distilled from shipping enprot v0.4.2 for aarch64-unknown-linux-ohos (HarmonyOS arm64). Covers the NDK setup, the two-triple problem, building C deps that don't use CMake, Cargo env vars, CI topology, and the 12-pitfall journey. Reference implementation: engyon/enprot (ci/setup-ohos-ndk.sh, ci/build-botan-ohos.sh, .github/workflows/ohos.yml).
OHOS (OpenHarmony / Huawei HarmonyOS) is musl-based arm64. Naively reusing aarch64-linux-musl bytes does not work — even though the dynamic linker path matches (/lib/ld-musl-aarch64.so.1), the ABIs differ in subtle ways:
- musl symbol versions (Alpine carries patches OHOS doesn't, and vice versa)
- Default symbol visibility (
-fvisibility=hiddendefaults differ)