Skip to main content

Crate day_toolkit_arkui

Crate day_toolkit_arkui 

Source
Expand description

day-toolkit-arkui: the HarmonyOS Next ArkUI backend (target harmony-arkui; DESIGN.md §9).

HarmonyOS has no AOSP layer; its UI framework is ArkUI. Day drives it through the ArkUI Native NodeAPI, bound by openharmony-rs’s ohos-sys (src/node.rs): every Piece becomes a real ArkUI_NodeHandle (Text / Button / TextInput / Toggle / Slider / Stack), built natively and mounted into an ArkTS NodeContent slot. The ArkTS host reaches the native side through the NAPI module ohos-rs’s napi-ohos registers (src/host_api.rs). Architecturally it mirrors day-toolkit-material: a managed UI runtime (ArkTS) hosts the window, native code (Rust) builds the tree, and day owns absolute layout: containers are ARKUI_NODE_STACK and each child gets an explicit position + size (in vp = day points).

Off HarmonyOS the crate is empty (cfg(target_env = "ohos")), so the workspace still type-checks on the host.