-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCargo.toml
141 lines (129 loc) · 4.9 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
[package]
name = "ohos-sys"
version = "0.6.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"]
readme = "Readme.md"
resolver = "2"
rust-version = "1.78.0"
[workspace]
members = ["components/*", "components/multimedia/image_framework"]
exclude = ["components/multimedia", "scripts"]
[workspace.dependencies]
ohos-sys-opaque-types = { version = "0.1.4", path = "components/opaque-types" }
[dependencies]
arkui-sys = { version = "0.2.2", optional = true, path = "components/arkui" }
document-features = { version = "0.2", optional = true }
ohos-drawing-sys = { path = "components/drawing", version = "0.2.1", optional = true}
ohos-deviceinfo-sys = { version = "0.1.2", optional = true, path = "components/deviceinfo"}
hitrace-sys = { version = "0.1.4", optional = true, path = "components/hitrace"}
ohos-ime-sys = { version = "0.1.3", optional = true, path = "components/inputmethod"}
hilog-sys = { version = "0.1.4", optional = true, path = "components/hilog"}
xcomponent-sys = {version = "0.3.0", optional = true, path = "components/xcomponent"}
ohos-image-kit-sys = {version = "0.2", optional = true, path = "components/multimedia/image_framework"}
ohos-sys-opaque-types = { workspace = true}
ohos-vsync-sys = { version = "0.1.1", optional = true, path = "components/vsync"}
[features]
default = ["api-10"]
## Enables bindings to the native ArkUI module. Re-exports the `arkui-sys` library.
arkui = ["dep:arkui-sys"]
## 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", "arkui-sys?/drawing"]
## 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"]
## Bindings to the [Image Kit](https://docs.openharmony.cn/pages/v5.0/en/application-dev/media/image/image-overview.md)
image-kit = ["dep:ohos-image-kit-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 = ["dep:ohos-vsync-sys"]
## Enables bindings to `native_xcomponent`
xcomponent = ["dep:xcomponent-sys"]
## Enables all components listed above. Orthogonal to `api-XX` features.
all-components = [
"arkui",
"deviceinfo",
"drawing",
"hilog",
"hitrace",
"inputmethod",
"image-kit",
"image-kit-image-packer",
"image-kit-image-receiver",
"image-kit-image-source",
"image-kit-pixelmap",
"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",
"ohos-vsync-sys?/api-11",
]
## Enables bindings for OpenHarmony API-level 12
api-12 = ["api-11",
"arkui-sys?/api-12",
"ohos-deviceinfo-sys?/api-12",
"ohos-drawing-sys?/api-12",
"hilog-sys?/api-12",
"hitrace-sys?/api-12",
"ohos-ime-sys?/api-12",
"ohos-image-kit-sys?/api-12",
"xcomponent-sys?/api-12",
"ohos-vsync-sys?/api-12",
]
## Enables bindings for OpenHarmony API-level 13
api-13 = ["api-12",
"arkui-sys?/api-13",
"ohos-deviceinfo-sys?/api-13",
"ohos-drawing-sys?/api-13",
"hilog-sys?/api-13",
"hitrace-sys?/api-13",
"ohos-ime-sys?/api-13",
"ohos-image-kit-sys?/api-13",
"xcomponent-sys?/api-13",
"ohos-vsync-sys?/api-13",
]
#! ### 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
image-kit-image-packer = ["ohos-image-kit-sys/image-packer"]
image-kit-image-receiver = ["ohos-image-kit-sys/image-receiver"]
image-kit-image-source = ["ohos-image-kit-sys/image-source"]
image-kit-pixelmap = ["ohos-image-kit-sys/pixelmap"]
#! ### Internal features
## 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