| 1 |
[package] |
| 2 |
name = "png" |
| 3 |
version = "0.18.0" |
| 4 |
license = "MIT OR Apache-2.0" |
| 5 |
|
| 6 |
description = "PNG decoding and encoding library in pure Rust" |
| 7 |
categories = ["multimedia::images"] |
| 8 |
authors = ["The image-rs Developers"] |
| 9 |
repository = "https://github.com/image-rs/image-png" |
| 10 |
|
| 11 |
edition = "2021" |
| 12 |
rust-version = "1.73" |
| 13 |
include = [ |
| 14 |
"/LICENSE-MIT", |
| 15 |
"/LICENSE-APACHE", |
| 16 |
"/README.md", |
| 17 |
"/CHANGES.md", |
| 18 |
"/src/", |
| 19 |
"/examples/", |
| 20 |
"/benches/", |
| 21 |
] |
| 22 |
|
| 23 |
[dependencies] |
| 24 |
bitflags = "2.0" |
| 25 |
crc32fast = "1.2.0" |
| 26 |
fdeflate = "0.3.3" |
| 27 |
flate2 = "1.0.35" |
| 28 |
miniz_oxide = { version = "0.8", features = ["simd"] } |
| 29 |
|
| 30 |
[dev-dependencies] |
| 31 |
approx = "0.5.1" |
| 32 |
byteorder = "1.5.0" |
| 33 |
clap = { version = "4.0", features = ["derive"] } |
| 34 |
criterion = { version = "0.7.0", default-features = false, features = ["cargo_bench_support"] } |
| 35 |
glob = "0.3" |
| 36 |
rand = "0.9.2" |
| 37 |
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] |
| 38 |
criterion = "0.7.0" |
| 39 |
|
| 40 |
[features] |
| 41 |
# Use nightly-only features for a minor performance boost in PNG decoding |
| 42 |
unstable = ["crc32fast/nightly"] |
| 43 |
# Use zlib-rs for faster PNG encoding at the cost of some `unsafe` code. |
| 44 |
# WARNING: this changes the flate2 backend for your entire dependency tree! |
| 45 |
# While the `png` crate always uses fully memory-safe decoding, |
| 46 |
# this enables zlib-rs and introduces some unsafe code to all other crates |
| 47 |
# that rely on flate2, including the decoding codepaths. |
| 48 |
zlib-rs = ["flate2/zlib-rs"] |
| 49 |
benchmarks = [] |
| 50 |
|
| 51 |
[lints.rust] |
| 52 |
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] } |
| 53 |
|
| 54 |
[[bench]] |
| 55 |
path = "benches/decoder.rs" |
| 56 |
name = "decoder" |
| 57 |
harness = false |
| 58 |
|
| 59 |
[[bench]] |
| 60 |
path = "benches/unfilter.rs" |
| 61 |
name = "unfilter" |
| 62 |
harness = false |
| 63 |
required-features = ["benchmarks"] |
| 64 |
|
| 65 |
[[bench]] |
| 66 |
path = "benches/adam7.rs" |
| 67 |
name = "adam7" |
| 68 |
harness = false |
| 69 |
required-features = ["benchmarks"] |
| 70 |
|
| 71 |
[[bench]] |
| 72 |
path = "benches/expand_paletted.rs" |
| 73 |
name = "expand_paletted" |
| 74 |
harness = false |
| 75 |
required-features = ["benchmarks"] |