codec-eval 0.3.0

Image codec comparison and evaluation library
Documentation
[workspace]
members = [".", "crates/codec-eval-cli", "crates/codec-compare"]
resolver = "2"

[workspace.package]
version = "0.3.0"
edition = "2024"
license = "MIT OR Apache-2.0"
repository = "https://github.com/imazen/codec-eval"
rust-version = "1.85"

[workspace.dependencies]
codec-eval = { path = "." }
thiserror = "2"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
csv = "1.3"
imgref = "1.10"
rgb = "0.8"
dssim-core = "3.4"
fast-ssim2 = { version = "0.6.5", features = ["imgref"] }
butteraugli = "0.4"
rayon = "1.10"
chrono = { version = "0.4", features = ["serde"] }
clap = { version = "4.5", features = ["derive", "env"] }
tempfile = "3"
# ICC color management - moxcms is pure Rust and closest to libjxl's skcms
moxcms = { version = "0.7", features = ["options"] }
# JPEG decoding with ICC profile extraction
jpeg-decoder = "0.3"
# Test image corpus download and caching
codec-corpus = "1.0"

[package]
name = "codec-eval"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
description = "Image codec comparison and evaluation library"

[features]
default = ["icc", "jpeg-decode", "corpus"]
# Enable ICC color profile support using moxcms (pure Rust, closest to libjxl's skcms)
icc = ["moxcms"]
# Enable JPEG decoding with ICC profile extraction
jpeg-decode = ["jpeg-decoder"]
# Enable corpus download/caching via codec-corpus crate
corpus = ["dep:codec-corpus"]
# Enable SVG chart generation (used by codec-compare)
chart = []
# Enable polynomial interpolation for quality curves (advanced use)
interpolation = []

[dependencies]
thiserror.workspace = true
serde.workspace = true
serde_json.workspace = true
csv.workspace = true
imgref.workspace = true
rgb.workspace = true
dssim-core.workspace = true
fast-ssim2.workspace = true
butteraugli.workspace = true
rayon.workspace = true
chrono.workspace = true
# Optional ICC support
moxcms = { workspace = true, optional = true }
# Optional JPEG decoding with ICC profile extraction
jpeg-decoder = { workspace = true, optional = true }
# Optional corpus download/caching
codec-corpus = { workspace = true, optional = true }

[dev-dependencies]
tempfile.workspace = true

[lints.rust]
unsafe_code = "warn"
# Allow deprecated API usage temporarily (butteraugli old API, to be updated)
deprecated = "allow"

[lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
# Allow common false positives from pedantic
missing_errors_doc = "allow"
missing_panics_doc = "allow"
must_use_candidate = "allow"
items_after_statements = "allow"
unreadable_literal = "allow"
module_name_repetitions = "allow"
doc_markdown = "allow"
# Allow cast issues in stats code
cast_precision_loss = "allow"
cast_possible_truncation = "allow"
cast_sign_loss = "allow"
cast_lossless = "allow"
# Allow float comparisons in tests (exact comparisons are intentional)
float_cmp = "allow"
# Allow these style choices
if_not_else = "allow"
redundant_closure_for_method_calls = "allow"
option_if_let_else = "allow"
map_unwrap_or = "allow"
trivially_copy_pass_by_ref = "allow"
match_same_arms = "allow"
needless_raw_string_hashes = "allow"
unused_self = "allow"
uninlined_format_args = "allow"
ref_option = "allow"
unnecessary_map_or = "allow"
collapsible_if = "allow"
needless_pass_by_value = "allow"
too_many_lines = "allow"
struct_excessive_bools = "allow"
cloned_instead_of_copied = "allow"
stable_sort_primitive = "allow"
manual_midpoint = "allow"