After PR https://github.com/shssoichiro/oxipng/pull/481 was merged, the `image` dependency became unused when building with debug assertions disabled, as it is only used to implement output sanity checks when such assertions are enabled. The `image` crate transitively pulls a significant amount of dependencies, so it's useful for OxiPNG users to get rid of them when not needed. [Cargo does not allow specifying dependencies that are only pulled when debug assertions are enabled](https://github.com/rust-lang/cargo/issues/7634), so the next best way to give users some flexibility is to gate those debug assertions behind a feature flag. These changes add a `sanity-checks` feature flag that controls whether the `image` crate and the related sanity checks are compiled in. This feature is enabled by default to keep debug builds useful to catch problems during development.
82 lines
1.7 KiB
TOML
82 lines
1.7 KiB
TOML
[package]
|
|
authors = ["Joshua Holmer <jholmer.in@gmail.com>"]
|
|
categories = ["command-line-utilities", "compression"]
|
|
description = "A lossless PNG compression optimizer"
|
|
documentation = "https://docs.rs/oxipng"
|
|
edition = "2021"
|
|
exclude = ["tests/*", "bench/*"]
|
|
homepage = "https://github.com/shssoichiro/oxipng"
|
|
license = "MIT"
|
|
name = "oxipng"
|
|
repository = "https://github.com/shssoichiro/oxipng"
|
|
version = "8.0.0"
|
|
rust-version = "1.61.0"
|
|
|
|
[badges]
|
|
travis-ci = { repository = "shssoichiro/oxipng", branch = "master" }
|
|
maintenance = { status = "actively-developed" }
|
|
|
|
[[bin]]
|
|
doc = false
|
|
name = "oxipng"
|
|
path = "src/main.rs"
|
|
required-features = ["binary"]
|
|
|
|
[dependencies]
|
|
zopfli = { version = "0.7.1", optional = true }
|
|
rgb = "0.8.33"
|
|
indexmap = "1.9.1"
|
|
libdeflater = "0.11.0"
|
|
log = "0.4.17"
|
|
stderrlog = { version = "0.5.3", optional = true, default-features = false }
|
|
bitvec = "1.0.1"
|
|
rustc-hash = "1.1.0"
|
|
|
|
[dependencies.crossbeam-channel]
|
|
optional = true
|
|
version = "0.5.6"
|
|
|
|
[dependencies.filetime]
|
|
optional = true
|
|
version = "0.2.17"
|
|
|
|
[dependencies.rayon]
|
|
optional = true
|
|
version = "1.5.3"
|
|
|
|
[dependencies.clap]
|
|
optional = true
|
|
version = "3.2.20"
|
|
|
|
[dependencies.wild]
|
|
optional = true
|
|
version = "2.1.0"
|
|
|
|
[dependencies.image]
|
|
optional = true
|
|
default-features = false
|
|
features = ["png"]
|
|
version = "0.24.3"
|
|
|
|
[build-dependencies]
|
|
rustc_version = "0.4.0"
|
|
|
|
[features]
|
|
binary = ["clap", "wild", "stderrlog"]
|
|
default = ["binary", "filetime", "parallel", "zopfli"]
|
|
parallel = ["rayon", "indexmap/rayon", "crossbeam-channel"]
|
|
freestanding = ["libdeflater/freestanding"]
|
|
sanity-checks = ["image"]
|
|
|
|
[lib]
|
|
name = "oxipng"
|
|
path = "src/lib.rs"
|
|
|
|
[profile.dev]
|
|
opt-level = 2
|
|
|
|
[profile.release]
|
|
lto = "thin"
|
|
|
|
[profile.dev.package.bitvec]
|
|
opt-level = 3
|