Skip to content

Commit

Permalink
add image dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
joseluis committed Jan 30, 2025
1 parent 5ed558a commit b1ac5fc
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 21 deletions.
33 changes: 21 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ publish = true
bench = false


[features] # 268/300 (32 remaining), 139 visible, 129 hidden
[features] # 269/300 (31 remaining), 140 visible, 129 hidden
# ==============================================================================
# https://doc.rust-lang.org/cargo/reference/features.html

Expand Down Expand Up @@ -510,15 +510,15 @@ _string_all = [
# - https://doc.rust-lang.org/edition-guide/rust-2024/cargo-remove-implicit-features.html

# In sync with ./config/dep_all.rs & ./src/_dep.rs
dep_all = [ # enables all 45 optional dependencies:
dep_all = [ # enables all 46 optional dependencies:
"dep_allocator_api2", "dep_atomic", "dep_bumpalo", "dep_bytemuck", "dep_const_str",
"dep_crossterm", "dep_fltk", "dep_gilrs", "dep_hashbrown", "dep_itertools", "dep_jiff",
"dep_js_sys", "dep_kira", "dep_libm", "dep_log", "dep_memchr", "dep_midir", "dep_miniquad",
"dep_nc", "dep_portable_atomic", "dep_pyo3", "dep_rand_core", "dep_rayon", "dep_raw_cpuid",
"dep_regex_lite", "dep_ring", "dep_rkyv", "dep_rodio", "dep_rustix", "dep_safe_arch",
"dep_sdl2", "dep_serde", "dep_stringzilla", "dep_sysinfo", "dep_symphonia", "dep_tinyaudio",
"dep_tokio", "dep_tracing", "dep_unicode_segmentation", "dep_unicode_width", "dep_ureq",
"dep_wasm_bindgen", "dep_web_sys", "dep_wide", "dep_winnow"
"dep_crossterm", "dep_fltk", "dep_gilrs", "dep_hashbrown", "dep_image", "dep_itertools",
"dep_jiff", "dep_js_sys", "dep_kira", "dep_libm", "dep_log", "dep_memchr", "dep_midir",
"dep_miniquad", "dep_nc", "dep_portable_atomic", "dep_pyo3", "dep_rand_core", "dep_rayon",
"dep_raw_cpuid", "dep_regex_lite", "dep_ring", "dep_rkyv", "dep_rodio", "dep_rustix",
"dep_safe_arch", "dep_sdl2", "dep_serde", "dep_stringzilla", "dep_sysinfo", "dep_symphonia",
"dep_tinyaudio", "dep_tokio", "dep_tracing", "dep_unicode_segmentation", "dep_unicode_width",
"dep_ureq", "dep_wasm_bindgen", "dep_web_sys", "dep_wide", "dep_winnow"
]

# groups of dependencies, environment and modules
Expand All @@ -540,6 +540,7 @@ dep_fltk = ["dep:fltk"]
dep_gilrs = ["dep:gilrs"] # ui::service
dep_hashbrown = ["dep:hashbrown", "alloc", "pyo3?/hashbrown", # data::cols
"rkyv?/hashbrown-0_15"]
dep_image = ["dep:image"] # media::image
dep_itertools = ["dep:itertools"] # data::iter
dep_jiff = ["dep:jiff", "alloc"] # phys::time
dep_js_sys = ["dep:js-sys"] # lang::js
Expand All @@ -553,7 +554,7 @@ dep_nc = ["dep:nc"]
dep_portable_atomic = ["dep:portable-atomic"] # work::sync
dep_pyo3 = ["dep:pyo3", "std"] # lang::py
dep_rand_core = ["dep:rand_core"] # num::rand
dep_rayon = ["dep:rayon", "sysinfo?/multithread"] # work::thread
dep_rayon = ["dep:rayon", "image?/rayon", "sysinfo?/multithread"] # work::thread
dep_raw_cpuid = ["dep:raw-cpuid"] # sys::arch
dep_regex_lite = ["dep:regex-lite", "std"] # text::parse
dep_ring = ["dep:ring"] # data::*
Expand All @@ -579,8 +580,7 @@ dep_wide = ["dep:wide"]
dep_winnow = ["dep:winnow"] # text::parse



[dependencies] # 46 (2 required, 44 optional)
[dependencies] # 48 (2 required, 46 optional)
# ==============================================================================
# https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html
#
Expand Down Expand Up @@ -660,6 +660,15 @@ optional = true # unsafe
default-features = false # 14 https://docs.rs/crate/hashbrown/latest/features
features = ["default-hasher", "inline-more"]

[dependencies.image] # https://crates.io/crates/image
version = "0.25.5" # ✓ https://github.com/image-rs/image/blob/main/CHANGES.md
optional = true # unsafe (mostly dependencies)
default-features = false # 23 https://docs.rs/crate/image/latest/features
features = ["jpeg", "png", "pnm"]
# feature-gated: "rayon",
# other: "bmp", "ff", "ico", "gif", "qoi", "dds", "hdr", "exr", "tga", "tiff", "webp"
# heavy: "avif"

[dependencies.itertools] # https://crates.io/crates/itertools
version = "0.14" # ✓ https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md
optional = true # safe enough (simple few)
Expand Down
2 changes: 1 addition & 1 deletion DOCS/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
- `ExtFuture`: `pending`, `poll_fn`, `ready`.
- prngs: `from_state`, `inner_state`.
- new re-exports: `SystemAlloc`, `std::{env::*, process::*}`, `::log::*`
- new optional dependencies: `gilrs`, `itertools`, `ring`, `ureq`.
- new optional dependencies: `fltk`, `gilrs`, `image`, `itertools`, `ring`, `ureq`.
- add musl architectures to `check.rs` script.

### Removed
Expand Down
14 changes: 7 additions & 7 deletions config/dep_all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
// NOTE: make sure to recompile `../utils/check.rs` after modifying this file.
[
"dep_allocator_api2", "dep_atomic", "dep_bumpalo", "dep_bytemuck", "dep_const_str",
"dep_crossterm", "dep_fltk", "dep_gilrs", "dep_hashbrown", "dep_itertools", "dep_jiff",
"dep_js_sys", "dep_kira", "dep_libm", "dep_log", "dep_memchr", "dep_midir", "dep_miniquad",
"dep_nc", "dep_portable_atomic", "dep_pyo3", "dep_rand_core", "dep_rayon", "dep_raw_cpuid",
"dep_regex_lite", "dep_ring", "dep_rkyv", "dep_rodio", "dep_rustix", "dep_safe_arch",
"dep_sdl2", "dep_serde", "dep_stringzilla", "dep_sysinfo", "dep_symphonia", "dep_tinyaudio",
"dep_tokio", "dep_tracing", "dep_unicode_segmentation", "dep_unicode_width", "dep_ureq",
"dep_wasm_bindgen", "dep_web_sys", "dep_wide", "dep_winnow"
"dep_crossterm", "dep_fltk", "dep_gilrs", "dep_hashbrown", "dep_image", "dep_itertools",
"dep_jiff", "dep_js_sys", "dep_kira", "dep_libm", "dep_log", "dep_memchr", "dep_midir",
"dep_miniquad", "dep_nc", "dep_portable_atomic", "dep_pyo3", "dep_rand_core", "dep_rayon",
"dep_raw_cpuid", "dep_regex_lite", "dep_ring", "dep_rkyv", "dep_rodio", "dep_rustix",
"dep_safe_arch", "dep_sdl2", "dep_serde", "dep_stringzilla", "dep_sysinfo", "dep_symphonia",
"dep_tinyaudio", "dep_tokio", "dep_tracing", "dep_unicode_segmentation", "dep_unicode_width",
"dep_ureq", "dep_wasm_bindgen", "dep_web_sys", "dep_wide", "dep_winnow"
]
5 changes: 4 additions & 1 deletion src/_dep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub extern crate alloc as _alloc;
#[doc(inline)]
pub use ::std as _std;

/* 42 optional dependencies */
/* 46 optional dependencies */
// In sync with ../Cargo.toml::dep_all & ../config/dep_all.rs

reexport! { optional_crate (unsafe) "dep_allocator_api2", "allocator-api2", allocator_api2,
Expand Down Expand Up @@ -62,6 +62,9 @@ reexport! { optional_crate (unsafe) "dep_hashbrown", "hashbrown", hashbrown,
doc: "A drop-in replacement for Rust’s standard `HashMap` and `HashSet`.",
features: "alloc"
}
reexport! { optional_crate (unsafe) "dep_image", "image", image,
doc: "Basic image processing and encoders/decoders for common image formats."
}
reexport! { optional_crate (safe) "dep_itertools", "itertools", itertools,
doc: "Extra iterator adaptors, iterator methods, functions, and macros."
}
Expand Down

0 comments on commit b1ac5fc

Please sign in to comment.