Expand description
Ohos-sys
This crate provides Raw FFI bindings to the native API of OpenHarmonyOS (target_env = "ohos").
Each module corresponds to one OpenHarmony API feature, and is gated behind a cargo feature.
If you are an application developer, you probably do not want to use this crate directly,
and instead want to use a higher-level API built on top of this crate.
Note: There are currently still quite a few missing bindings, which will slowly be added.
§Feature flags
drawing— Enables bindings tonative_drawing. Re-exportsohos-drawing-sys.hilog— Enables bindings tohilognapi— Enables bindings tonapinative_buffer— Enables bindings tonative_buffernative_window— Enables bindings tonative_windowvsync— Enables bindings tonative_vsyncxcomponent— Enables bindings tonative_xcomponentall-components— Enables all components listed above. Orthogonal toapi-XXfeatures.
§OpenHarmony API level
This crate by default exposes bindings for API-level 10.
Optionally enable one of the api-* features to get access to bindings for newer
OpenHarmony versions.
api-10(enabled by default) — No effect. API-10 bindings can’t be deselected. The feature exists for internal purposes.api-11— Enables bindings for OpenHarmony API-level 11api-12— EXPERIMENTAL: Enables bindings for OpenHarmony API-level 12 (beta-1). Will stabilize once the final version has been released.document-features— Document available features when building the documentation
Modules§
- drawing
drawing - hilog
hilog - napi
napi - native_
buffer native_bufferNative Buffer bindings - native_
window native_windowNative Window bindings - vsync
vsyncBindings to the native vsync APIs - xcomponent
xcomponentNative XComponent bindings