Skip to content

Commit

Permalink
ohos-sys: Re-export hitrace-sys bindings
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Schwender <[email protected]>
  • Loading branch information
jschwe committed Sep 5, 2024
1 parent c5a490e commit 664e28b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v0.3.1 (2024-09-05)

## Add

- Re-export hitrace-sys binding (behind hitrace feature)

# v0.3.0 (2024-08-29)

## Breaking
Expand Down
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ohos-sys"
version = "0.3.0"
version = "0.3.1"
edition = "2021"
description = "Bindings to the native API of OpenHarmony OS"
license = "Apache-2.0"
Expand All @@ -17,6 +17,7 @@ members = ["components/*"]
document-features = { version = "0.2", optional = true }
ohos-drawing-sys = { path = "components/drawing", version = "0.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"}

[features]
default = ["api-10"]
Expand All @@ -26,6 +27,8 @@ deviceinfo = ["dep:ohos-deviceinfo-sys"]
drawing = ["dep:ohos-drawing-sys"]
## Enables bindings to `hilog`
hilog = []
## Enables bindings to `hitrace`
hitrace = ["dep:hitrace-sys"]
## Enables bindings to `napi`
napi = []
## Enables bindings to `native_buffer`
Expand Down Expand Up @@ -60,14 +63,16 @@ api-10 = []
## Enables bindings for OpenHarmony API-level 11
api-11 = ["api-10",
"ohos-deviceinfo-sys?/api-11",
"ohos-drawing-sys?/api-11"
"ohos-drawing-sys?/api-11",
"hitrace-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"
]
"ohos-drawing-sys?/api-12",
"hitrace-sys?/api-12"
]
## Document available features when building the documentation
document-features = ["dep:document-features"]

Expand Down
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ pub mod drawing {
#[cfg_attr(docsrs, doc(cfg(feature = "hilog")))]
pub mod hilog;

#[cfg(feature = "hitrace")]
#[cfg_attr(docsrs, doc(cfg(feature = "hitrace")))]
pub mod hitrace {
pub use hitrace_sys::*;
}

#[cfg(feature = "napi")]
#[cfg_attr(docsrs, doc(cfg(feature = "napi")))]
pub mod napi;
Expand Down

0 comments on commit 664e28b

Please sign in to comment.