Cargo Features

[dependencies]
ohos-sys = { version = "0.6.0", default-features = false, features = ["arkui", "deviceinfo", "drawing", "hilog", "hitrace", "inputmethod", "image-kit", "napi", "native_buffer", "native_image", "native_window", "vsync", "xcomponent", "all-components", "api-10", "api-11", "api-12", "api-13", "image-kit-image-packer", "image-kit-image-receiver", "image-kit-image-source", "image-kit-pixelmap", "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.

arkui all-components?

Enables bindings to the native ArkUI module. Re-exports the arkui-sys library.

Enables arkui-sys

deviceinfo all-components?

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

Enables ohos-deviceinfo-sys

drawing all-components?

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

Enables ohos-drawing-sys, drawing of optional arkui-sys

hilog all-components?

Enables bindings to hilog

Enables hilog-sys

hitrace all-components?

Enables bindings to hitrace

Enables hitrace-sys

inputmethod all-components?

Enables bindings to inputmethod from the IME-Kit. Empty if API-level < 12.

Enables ohos-ime-sys

image-kit all-components?

Bindings to the Image Kit

Enables ohos-image-kit-sys

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

Enables ohos-vsync-sys

xcomponent all-components?

Enables bindings to native_xcomponent

Enables xcomponent-sys

all-components = arkui, deviceinfo, drawing, hilog, hitrace, image-kit, image-kit-image-packer, image-kit-image-receiver, image-kit-image-source, image-kit-pixelmap, inputmethod, 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 hilog-sys, optional hitrace-sys, optional ohos-deviceinfo-sys, optional ohos-drawing-sys, optional ohos-vsync-sys, and optional xcomponent-sys

Affects napi_ffi::napi_native_binding_detach_callback, napi_ffi::napi_native_binding_attach_callback, napi_ffi::napi_coerce_to_native_binding_object, native_buffer_ffi::OH_NativeBuffer_SetColorSpace, native_image_ffi::OH_OnFrameAvailable, native_image_ffi::OH_OnFrameAvailableListener, native_image_ffi::OH_NativeImage_GetSurfaceId, native_image_ffi::OH_NativeImage_SetOnFrameAvailableListener, native_image_ffi::OH_NativeImage_UnsetOnFrameAvailableListener, native_window_ffi::OH_NativeBuffer_ColorSpace, native_window_ffi::OH_NativeWindow_CreateNativeWindowBufferFromNativeBuffer, native_window_ffi::OH_NativeWindow_GetLastFlushedBuffer

api-12 api-13? = api-11

Enables bindings for OpenHarmony API-level 12

Enables api-12 of optional arkui-sys, optional hilog-sys, optional hitrace-sys, optional ohos-deviceinfo-sys, optional ohos-drawing-sys, optional ohos-image-kit-sys, optional ohos-ime-sys, optional ohos-vsync-sys, and optional xcomponent-sys

Affects napi_ffi::napi_event_mode, napi_ffi::napi_task_priority, napi_ffi::napi_load_module_with_info, napi_ffi::napi_create_ark_runtime, napi_ffi::napi_destroy_ark_runtime, napi_ffi::napi_is_sendable, napi_ffi::napi_create_sendable_object_with_properties, napi_ffi::napi_wrap_sendable, napi_ffi::napi_wrap_sendable_with_size, napi_ffi::napi_unwrap_sendable, napi_ffi::napi_remove_wrap_sendable, napi_ffi::napi_run_event_loop, napi_ffi::napi_stop_event_loop, napi_ffi::napi_serialize, napi_ffi::napi_deserialize, napi_ffi::napi_delete_serialization_data, native_buffer_ffi::OH_NativeBuffer_TransformType, native_buffer_ffi::OH_NativeBuffer_ColorGamut, native_buffer_ffi::OH_NativeBuffer_Plane, native_buffer_ffi::OH_NativeBuffer_Planes

api-13 = api-12

Enables bindings for OpenHarmony API-level 13

Enables api-13 of optional arkui-sys, optional hilog-sys, optional hitrace-sys, optional ohos-deviceinfo-sys, optional ohos-drawing-sys, optional ohos-image-kit-sys, optional ohos-ime-sys, optional ohos-vsync-sys, and optional xcomponent-sys

Affects native_image_ffi::OH_ConsumerSurface_SetDefaultUsage, native_image_ffi::OH_ConsumerSurface_SetDefaultSize, native_window_ffi::NativeWindowOperation.SET_DESIRED_PRESENT_TIMESTAMP

image-kit-image-packer all-components?

Features of dependencies

Re-exports features of individual component crates of ohos-sys. In general, it is recommended to depend on the individual component crates

Enables image-packer of ohos-image-kit-sys

image-kit-image-receiver all-components?

Enables image-receiver of ohos-image-kit-sys

ohos-image-kit-sys:

Obtain image data from the native layer

image-kit-image-source all-components?

Enables image-source of ohos-image-kit-sys

ohos-image-kit-sys:

Image decoding

image-kit-pixelmap all-components?

Enables pixelmap of ohos-image-kit-sys

ohos-image-kit-sys:

Pixel Map

document-features

Internal features

Document available features when building the documentation

Enables document-features