Skip to content

Commit

Permalink
image-packer: Properly feature guard
Browse files Browse the repository at this point in the history
The features weren't actually used.
This is just a hot fix for CI.
A more complete solution is still needed to address
types being used across multiple components / modules.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
  • Loading branch information
jschwe committed Jan 30, 2025
1 parent 4b49203 commit 33d5c3c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions components/multimedia/image_framework/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ image-packer = []
image-receiver = []
## Image decoding
image-source = ["dep:ohos-rawfile-sys"]
## Picture
picture = ["pixelmap"]
## Pixel Map
pixelmap = []
## Document available features when building the documentation
Expand Down
12 changes: 10 additions & 2 deletions components/multimedia/image_framework/src/native_image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@
pub mod common;
pub mod image;
#[cfg(feature = "image-packer")]
#[cfg_attr(docsrs, doc(cfg(feature = "image-packer")))]
pub mod image_packer;
#[cfg(feature = "image-receiver")]
#[cfg_attr(docsrs, doc(cfg(feature = "image-receiver")))]
pub mod image_receiver;
#[cfg(feature = "image-source")]
#[cfg_attr(docsrs, doc(cfg(feature = "image-source")))]
pub mod image_source;
#[cfg(feature = "api-13")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
#[cfg(all(feature = "api-13", feature = "pixelmap"))]
#[cfg_attr(docsrs, doc(cfg(all(feature = "api-13", feature = "pixelmap"))))]
pub mod picture;
#[cfg(feature = "pixelmap")]
#[cfg_attr(docsrs, doc(cfg(feature = "pixelmap")))]
pub mod pixelmap;
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
#[link(name = "picture")]
extern "C" {}

mod picture_ffi;
pub use picture_ffi::*;

0 comments on commit 33d5c3c

Please sign in to comment.