Rust napi bindings layer for Cloudrs, the HarmonyOS client for Cloudreve.
It wraps the cloudreve-api crate (which implements both the Cloudreve V3 and V4 client APIs) together with reqwest + tokio for async networking, and compiles into libcloudreve.so — the native library loaded by the Cloudrs ArkTS layer via N-API.
napi/napi-derive— exposes Rust functions/types to ArkTS as N-API bindings.cloudreve-api— the actual Cloudreve V3/V4 HTTP client logic.reqwest+tokio— async runtime and HTTP transport (withrustls).- The resulting
cdylib(libcloudreve.so) is placed into the host project'sentry/libs/<abi>/.
The pre-built .so files are already shipped in the parent project's entry/libs/, so most Cloudrs contributors do not need a Rust toolchain. To rebuild after changing native code:
- Rust toolchain with the HarmonyOS targets:
rustup target add aarch64-unknown-linux-ohos x86_64-unknown-linux-ohos
- OpenHarmony native SDK (bundled with DevEco Studio).
# macOS / Linux
./build-ohos.sh
# Windows
pwsh ./build-ohos.ps1The script cross-compiles both arm64-v8a and x86_64 targets, verifies there are no undefined ring_core_* symbols (a guard against the silent empty-archive failure), and copies the artifacts to ../entry/libs/<abi>/libcloudreve.so.
Set OHOS_SDK_NATIVE if your SDK is not at the default DevEco Studio location.
Licensed under GPL-3.0, Copyright © 2026 Dreamfly Tech and Cloudrs contributors.