[package] name = "ohos-sys" version = "0.4.0" edition = "2021" description = "Bindings to the native API of OpenHarmony OS" license = "Apache-2.0" repository = "https://github.com/openharmony-rs/ohos-sys" keywords = ["OpenHarmony", "HarmonyOS", "ffi"] exclude = ["src/**/*_api11.rs", "src/**/*_api12.rs"] readme = "Readme.md" resolver = "2" [workspace] members = ["components/*"] [dependencies] document-features = { version = "0.2", optional = true } ohos-drawing-sys = { path = "components/drawing", version = "0.1.1", optional = true} ohos-deviceinfo-sys = { version = "0.1", optional = true, path = "components/deviceinfo"} hitrace-sys = { version = "0.1.2", optional = true, path = "components/hitrace"} ohos-ime-sys = { version = "0.1.1", optional = true, path = "components/inputmethod"} hilog-sys = { version = "0.1.2", optional = true, path = "components/hilog"} xcomponent-sys = {version = "0.1.1", optional = true, path = "components/xcomponent"} [features] default = ["api-10"] ## Enables bindings to `deviceinfo.h`. Re-exports `ohos-deviceinfo-sys` deviceinfo = ["dep:ohos-deviceinfo-sys"] ## Enables bindings to `native_drawing`. Re-exports `ohos-drawing-sys`. drawing = ["dep:ohos-drawing-sys"] ## Enables bindings to `hilog` hilog = ["dep:hilog-sys"] ## Enables bindings to `hitrace` hitrace = ["dep:hitrace-sys"] ## Enables bindings to `inputmethod` from the IME-Kit. Empty if API-level < 12. inputmethod = ["dep:ohos-ime-sys"] ## Enables bindings to `napi` napi = [] ## Enables bindings to `native_buffer` native_buffer = ['native_window'] ## Enables bindings to `native_image` native_image = ['native_window'] ## Enables bindings to `native_window` native_window = ['native_buffer'] ## Enables bindings to `native_vsync` vsync = [] ## Enables bindings to `native_xcomponent` xcomponent = ["dep:xcomponent-sys"] ## Enables all components listed above. Orthogonal to `api-XX` features. all-components = [ "deviceinfo", "drawing", "hilog", "hitrace", "inputmethod", "napi", "native_buffer", "native_image", "native_window", "xcomponent", "vsync"] #! ### 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-10 = [] ## Enables bindings for OpenHarmony API-level 11 api-11 = ["api-10", "ohos-deviceinfo-sys?/api-11", "ohos-drawing-sys?/api-11", "hilog-sys?/api-11", "hitrace-sys?/api-11", "xcomponent-sys?/api-11", ] ## **EXPERIMENTAL**: Enables bindings for OpenHarmony API-level 12 (beta-1). ## Will stabilize once the final version has been released. api-12 = ["api-11", "ohos-deviceinfo-sys?/api-12", "ohos-drawing-sys?/api-12", "hilog-sys?/api-12", "hitrace-sys?/api-12", "ohos-ime-sys?/api-12", "xcomponent-sys?/api-12", ] ## Document available features when building the documentation document-features = ["dep:document-features"] [package.metadata.docs.rs] features = ["document-features"] targets = ["aarch64-unknown-linux-ohos", "armv7-unknown-linux-ohos", "x86_64-unknown-linux-ohos"] all-features = true