Cargo Features

[dependencies]
ohos-sys = { version = "0.3.1", default-features = false, features = ["deviceinfo", "drawing", "hilog", "hitrace", "napi", "native_buffer", "native_image", "native_window", "vsync", "xcomponent", "all-components", "api-10", "api-11", "api-12", "document-features"] }
default = api-10

The api-10 feature is set by default whenever ohos-sys is added without default-features = false somewhere in the dependency tree.

deviceinfo all-components?

Enables bindings to deviceinfo.h. Re-exports ohos-deviceinfo-sys

Enables ohos-deviceinfo-sys

Affects ohos-sys::deviceinfo

drawing all-components?

Enables bindings to native_drawing. Re-exports ohos-drawing-sys.

Enables ohos-drawing-sys

Affects ohos-sys::drawing

hilog all-components?

Enables bindings to hilog

Affects ohos-sys::hilog

hitrace

Enables bindings to hitrace

Enables hitrace-sys

Affects ohos-sys::hitrace

napi all-components?

Enables bindings to napi

Affects ohos-sys::napi

native_buffer all-components? native_window? = native_window

Enables bindings to native_buffer

Affects ohos-sys::native_buffer

native_image all-components? = native_window

Enables bindings to native_image

Affects ohos-sys::native_image

native_window all-components? native_buffer? native_image? = native_buffer

Enables bindings to native_window

Affects ohos-sys::native_window

vsync all-components?

Enables bindings to native_vsync

Affects ohos-sys::vsync

xcomponent all-components?

Enables bindings to native_xcomponent

Affects ohos-sys::xcomponent

all-components = deviceinfo, drawing, hilog, napi, native_buffer, native_image, native_window, vsync, xcomponent

Enables all components listed above. Orthogonal to api-XX features.

api-10 default api-11?

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.

No effect. API-10 bindings can't be deselected. The feature exists for internal purposes.

api-11 api-12? = api-10

Enables bindings for OpenHarmony API-level 11

Enables api-11 of optional hitrace-sys, optional ohos-deviceinfo-sys, and optional ohos-drawing-sys

api-12 = api-11

**EXPERIMENTAL**: Enables bindings for OpenHarmony API-level 12 (beta-1).
Will stabilize once the final version has been released.

Enables api-12 of optional hitrace-sys, optional ohos-deviceinfo-sys, and optional ohos-drawing-sys

document-features

Document available features when building the documentation

Enables document-features