-
Notifications
You must be signed in to change notification settings - Fork 693
Expand file tree
/
Copy pathCargo.toml
More file actions
132 lines (114 loc) · 4.03 KB
/
Cargo.toml
File metadata and controls
132 lines (114 loc) · 4.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
[package]
name = "image"
# we are already working on 1.0.0 in git, but we're keeping the old version here
# to make it easier to depend on git for testing
version = "0.25.9"
edition = "2021"
resolver = "2"
# guard against accidentally publushing alpha releases:
# https://github.com/image-rs/image/pull/2648#discussion_r2539464776
publish = false
# note: when changed, also update test runner in `.github/workflows/rust.yml`
rust-version = "1.87.0"
license = "MIT OR Apache-2.0"
description = "Imaging library. Provides basic image processing and encoders/decoders for common image formats."
authors = ["The image-rs Developers"]
readme = "README.md"
# crates.io metadata
documentation = "https://docs.rs/image"
repository = "https://github.com/image-rs/image"
homepage = "https://github.com/image-rs/image"
categories = ["multimedia::images", "multimedia::encoding", "encoding"]
# Crate build related
exclude = ["src/png/testdata/*", "examples/*", "tests/*"]
include = [
"/LICENSE-APACHE",
"/LICENSE-MIT",
"/README.md",
"/CHANGES.md",
"/src/",
"/benches/",
]
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[dependencies]
bytemuck = { version = "1.8.0", features = ["extern_crate_alloc"] } # includes cast_vec
byteorder-lite = "0.1.0"
moxcms = { version = "0.7.4" }
num-traits = { version = "0.2.0" }
# Optional dependencies
color_quant = { version = "1.1", optional = true }
dav1d = { version = "0.11", optional = true }
exr = { version = "1.74.0", default-features = false, optional = true }
gif = { version = "0.14.1", optional = true }
image-webp = { version = "0.2.0", optional = true }
mp4parse = { version = "0.17.0", optional = true }
png = { version = "0.18.0", optional = true }
qoi = { version = "0.4", optional = true }
ravif = { version = "0.13", default-features = false, optional = true }
rayon = { version = "1.7.0", optional = true }
rgb = { version = "0.8.48", default-features = false, optional = true }
tiff = { version = "0.10.3", optional = true }
zune-core = { version = "0.5.0", default-features = false, optional = true }
zune-jpeg = { version = "0.5.13", optional = true }
jpeg-encoder = { version = "0.7.0", optional = true, features = ["simd"] }
serde = { version = "1.0.214", optional = true, features = ["derive"] }
pic-scale-safe = "0.1.5"
[dev-dependencies]
crc32fast = "1.2.0"
num-complex = "0.4"
glob = "0.3"
quickcheck = "1"
criterion = "0.5.0"
[features]
default = ["rayon", "default-formats"]
# Format features
default-formats = ["avif", "bmp", "dds", "exr", "ff", "gif", "hdr", "ico", "jpeg", "png", "pnm", "qoi", "tga", "tiff", "webp"]
avif = ["dep:ravif", "dep:rgb"]
bmp = []
dds = []
exr = ["dep:exr"]
ff = [] # Farbfeld image format
gif = ["dep:gif", "dep:color_quant"]
hdr = []
ico = ["bmp", "png"]
jpeg = ["dep:zune-core", "dep:zune-jpeg", "dep:jpeg-encoder"]
png = ["dep:png"]
pnm = []
qoi = ["dep:qoi"]
tga = []
tiff = ["dep:tiff"]
webp = ["dep:image-webp"]
# Other features
# TODO: add pic-scale-safe rayon in the next breaking release,
# see https://github.com/image-rs/image/pull/2639#discussion_r2508356543
rayon = ["dep:rayon", "ravif?/threading", "exr?/rayon"] # Enables multi-threading
nasm = ["ravif?/asm"] # Enables use of nasm by rav1e (requires nasm to be installed)
color_quant = ["dep:color_quant"] # Enables color quantization
avif-native = ["dep:mp4parse", "dep:dav1d"] # Enable native dependency libdav1d
benchmarks = [] # Build some inline benchmarks. Useful only during development (requires nightly Rust)
serde = ["dep:serde"]
[[bench]]
path = "benches/decode.rs"
name = "decode"
harness = false
[[bench]]
path = "benches/encode.rs"
name = "encode"
harness = false
[[bench]]
name = "copy_from"
harness = false
[[bench]]
path = "benches/fast_blur.rs"
name = "fast_blur"
harness = false
[[bench]]
path = "benches/blur.rs"
name = "blur"
harness = false
# because of https://github.com/image-rs/image/pull/2583
# TODO: remove when shipping the next major release after 0.25
[package.metadata.cargo-semver-checks.lints]
enum_discriminants_undefined_non_unit_variant = { level = "warn" }