Skip to content

Commit

Permalink
feat: added features to reduce lib size
Browse files Browse the repository at this point in the history
  • Loading branch information
SalOne22 committed Mar 10, 2024
1 parent 25d0d78 commit e23823f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 265 deletions.
260 changes: 0 additions & 260 deletions Cargo.lock

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

21 changes: 16 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,21 @@ lto = true
codegen-units = 1
opt-level = "z"

[features]
default = ["resize", "quantization"]

# Enables utilization of threads
threads = ["zune-image/threads", "zune-imageprocs/threads", "imagequant?/threads"]

# Enables resize operation
resize = ["dep:fast_image_resize"]
# Enables quantize operation
quantization = ["dep:imagequant", "dep:rgb"]

[dependencies]
fast_image_resize = "3.0.4"
imagequant = "4.3.0"
rgb = "0.8.37"
zune-core = "0.4.12"
zune-image = "0.4.15"
zune-imageprocs = "0.4.15"
zune-image = { version = "0.4.15", default-features = false, features = ["simd"]}
zune-imageprocs = { version = "0.4.15", default-features = false, features = ["avx2", "sse2", "sse3", "sse41" ] }
fast_image_resize = { version = "3.0.4", optional = true }
imagequant = { version = "4.3.0", default-features = false, optional = true }
rgb = { version = "0.8.37", optional = true }
2 changes: 2 additions & 0 deletions src/operations/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#[cfg(feature = "quantization")]
pub mod quantize;
#[cfg(feature = "resize")]
pub mod resize;

0 comments on commit e23823f

Please sign in to comment.