docs.rs failed to build napi-ohos-0.0.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
napi-rs-oh
napi-rsHarmonyOS版本。整体代码来源于napi-rs,针对鸿蒙系统做了部分裁剪和整理
目前仅用于本地测试可行性,后续将参考napi-rs做项目整体开发。
环境准备
- OpenHarmony SDK
配置环境变量为OHOS_NDK_HOME,进入之后目录结构应该包括 native ets js等目录 - Rust
MSRV 1.65.0
编译
# armv8a
cargo +nightly build --target aarch64-unknown-linux-ohos -Z build-std --release
# armv7a
cargo +nightly build --target armv7-unknown-linux-ohos -Z build-std --release
# x86_64
cargo +nightly build --target x86_64-unknown-linux-ohos -Z build-std --release
功能
- napi-rs整体运行
- 裁剪不支持功能
- 脚手架支持
- CI/CD支持