Quick Start
We provide a cli tool to simplify some action. For example: init
, build
and so on.
We will now begin to introduce this capability step by step.
Requirement
Before all, we need to install Rust
and HarmonyOS NDK
.
Rust
For rust, we can use official guide to install it.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
🌈
For more detail about rust, you can visit link
And then we need to install some toolchain and component, which will help use to build prebuild binary for HarmonyOS.
toolchain
OpenHarmony is
tier2
target for rust, so we must use custom toolchain or use source-code to build it. Just run this command and install toolchainsshellrustup target add aarch64-unknown-linux-ohos rustup target add armv7-unknown-linux-ohos rustup target add x86_64-unknown-linux-ohos
HarmonyOS NDK
TIP
For the latest SDK Version, You need DevEco Studio NEXT Developer Beta1 (5.0.3.100)
or later.
You just need to download the latest DevEco-Studio
and download the latest SDK. You can download it with official website
Install
Now, you can install cli tool with cargo
.
cargo install ohrs
Simple Project
Using ohrs
to init project
ohrs init hello
And using ohrs
to build project
ohrs build.md