docs.rs failed to build napi-ohos-0.0.3
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,针对鸿蒙系统做了部分裁剪和整理
环境准备
-
OpenHarmony SDK
配置环境变量为OHOS_NDK_HOME,进入之后目录结构应该包括 native ets js等目录 -
Rust
MSRV 1.65.0
快速开始
- 安装脚手架工具
cargo install ohrs
- 初始化项目
ohrs -i test
- 构建产物
ohrs build
指南
目前所有API基本对齐napi,你可以在example中看到在HarmonyOS工程中的应用。
TODO
-
CI支持 目前鸿蒙开放对于linux下通过NDK构建的能力支持太弱,等到API10放开后支持
-
鸿蒙官方底层能力包装 如hilog,vulkan,OpenGL等能力