-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCargo.toml
169 lines (156 loc) · 5.81 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
[package]
name = "ohos-sys"
version = "0.6.2"
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.3.0", optional = true, path = "components/arkui" }
document-features = { version = "0.2", optional = true }
hilog-sys = { version = "0.1.4", optional = true, path = "components/hilog"}
hitrace-sys = { version = "0.1.4", optional = true, path = "components/hitrace"}
ohos-deviceinfo-sys = { version = "0.1.2", optional = true, path = "components/deviceinfo"}
ohos-drawing-sys = { path = "components/drawing", version = "0.3.0", optional = true}
ohos-image-kit-sys = {version = "0.2", optional = true, path = "components/multimedia/image_framework"}
ohos-ime-sys = { version = "0.2.0", optional = true, path = "components/inputmethod"}
ohos-input-sys = { version = "0.2.0", optional = true, path = "components/multimodal-input"}
ohos-rawfile-sys = { version = "0.1.0", optional = true, path = "components/rawfile"}
ohos-sys-opaque-types = { workspace = true}
ohos-vsync-sys = { version = "0.1.2", optional = true, path = "components/vsync"}
xcomponent-sys = {version = "0.3.1", optional = true, path = "components/xcomponent"}
[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"]
## Bindings to the Multimodal Input kit.
multimodal-input = ["dep:ohos-input-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 `rawfile`
rawfile = ['ohos-rawfile-sys']
## 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",
"multimodal-input",
"napi",
"native_buffer",
"native_image",
"native_window",
"rawfile",
"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",
"hilog-sys?/api-11",
"hitrace-sys?/api-11",
"ohos-deviceinfo-sys?/api-11",
"ohos-drawing-sys?/api-11",
"ohos-vsync-sys?/api-11",
"ohos-rawfile-sys?/api-11",
"xcomponent-sys?/api-11",
]
## Enables bindings for OpenHarmony API-level 12
api-12 = ["api-11",
"arkui-sys?/api-12",
"hilog-sys?/api-12",
"hitrace-sys?/api-12",
"ohos-deviceinfo-sys?/api-12",
"ohos-drawing-sys?/api-12",
"ohos-image-kit-sys?/api-12",
"ohos-ime-sys?/api-12",
"ohos-input-sys?/api-12",
"ohos-rawfile-sys?/api-12",
"ohos-vsync-sys?/api-12",
"xcomponent-sys?/api-12",
]
## Enables bindings for OpenHarmony API-level 13
api-13 = ["api-12",
"arkui-sys?/api-13",
"hilog-sys?/api-13",
"hitrace-sys?/api-13",
"ohos-deviceinfo-sys?/api-13",
"ohos-drawing-sys?/api-13",
"ohos-image-kit-sys?/api-13",
"ohos-ime-sys?/api-13",
"ohos-input-sys?/api-13",
"ohos-rawfile-sys?/api-13",
"ohos-vsync-sys?/api-13",
"xcomponent-sys?/api-13",
]
## Enables bindings for OpenHarmony API-level 13
api-14 = ["api-13",
"arkui-sys?/api-14",
"ohos-drawing-sys?/api-14",
"ohos-image-kit-sys?/api-14",
"ohos-ime-sys?/api-14",
"ohos-input-sys?/api-14",
"ohos-vsync-sys?/api-14",
"xcomponent-sys?/api-14",
# "hilog-sys?/api-14",
# "hitrace-sys?/api-14",
# "ohos-rawfile-sys?/api-14",
# "ohos-deviceinfo-sys?/api-14",
]
#! ### 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