oxipng/Cargo.toml
AlexTMjugador b654c84eed Make cloudflare-zlib dependency optional
Although the Cloudflare fork of zlib may introduce performance
improvements, there are issues building it with MinGW toolchains on
Windows, as evidenced by this StackOverflow question: https://stackoverflow.com/questions/61170244/gcc-exe-fail-when-building-cloudflare-zlib-sys-rs

However, it is not always possible to switch to the MSVC toolchain on
Windows, because that may break other native C libraries which have
trouble with MSVC instead, and just compiling to a 32-bit target can get
pretty messy too.

I've opened an issue to get this error fixed upstream, in the
cloudflare-zlib-sys crate, but it was not fixed there yet.

Therefore, make the Cloudflare zlib dependency optional, so users will
have to explicitly opt in for it. As a side bonus, these changes also
remove the restriction of Cloudflare zlib only being available on x64
and Aarch64 platforms.
2021-02-26 15:28:19 +01:00

85 lines
1.6 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 = "2018"
exclude = [
"tests/*",
"bench/*",
]
homepage = "https://github.com/shssoichiro/oxipng"
license = "MIT"
name = "oxipng"
repository = "https://github.com/shssoichiro/oxipng"
build = "build.rs"
version = "4.0.3"
[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]
bit-vec = "^0.6.3"
byteorder = "^1.4.2"
crc = "^1.2.0"
itertools = "^0.10.0"
zopfli = { version = "^0.4.0", optional = true }
miniz_oxide = "0.4"
rgb = "0.8.25"
indexmap = "1.6.1"
libdeflater = { version = "0.7.1", optional = true }
log = "0.4.14"
stderrlog = { version = "0.5.1", optional = true }
crossbeam-channel = "0.5.0"
[dependencies.rayon]
optional = true
version = "^1.5.0"
[dependencies.clap]
optional = true
version = "^2.33.3"
[dependencies.wild]
optional = true
version = "2.0.4"
[dependencies.image]
default-features = false
features = ["png"]
version = "0.23"
[dependencies.cloudflare-zlib]
optional = true
features = ["arm-always"]
version = "^0.2.2"
[build-dependencies]
rustc_version = "0.3"
[features]
binary = [
"clap",
"wild",
"stderrlog",
]
default = ["binary", "parallel", "libdeflater", "zopfli"]
parallel = ["rayon", "indexmap/rayon"]
[lib]
name = "oxipng"
path = "src/lib.rs"
[profile.dev]
opt-level = 2
[profile.release]
lto = "thin"