[package]
name = "rxing"
version = "0.8.6"
description="A rust port of the zxing barcode library."
license="Apache-2.0"
repository="https://github.com/rxing-core/rxing"
keywords = ["barcode", "barcode_2d", "barcode_1d", "barcode_reader", "barcode_writer"]
edition = "2024"
exclude = [
    "test_resources/*",
]
rust-version = "1.85"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
regex = "1.12"
fancy-regex = "0.17"
once_cell = "1.21"
encoding_rs = { version = "0.8", optional = true }
encoding = { version = "0.2", optional = true }
urlencoding = "2.1"
uriparse = "0.6"
chrono = { version = "0.4", default-features = false, features = ["clock", "std", "oldtime"] }
chrono-tz = "0.10"
image = {version = "=0.25.8", optional = true, default-features = false}
imageproc = {version = "0.25", optional = true}
unicode-segmentation = "1.12"
codepage-437 = "0.1"
rxing-one-d-proc-derive = {version = "0.8", path ="./crates/one-d-proc-derive"}
num = "0.4"
svg = {version = "0.18", optional = true}
resvg = {version = "0.45", optional = true, default-features=false}
serde = { version = "1", features = ["derive", "rc"], optional = true }
thiserror = "2.0"
multimap = "0.10"

[dev-dependencies]
java-properties = "2.0"
java-rand = "0.2"
rand = "0.10"
criterion = "0.7"

[features]
default = ["image", "client_support", "image_formats", "serde", "encoding_rs"]
#/// Enable features required for image manipulation and reading.
image = ["dep:image", "dep:imageproc"]
image_formats = [
    "image",
    "image/gif",
    "image/jpeg",
    "image/ico",
    "image/png",
    "image/pnm",
    "image/tga",
    "image/tiff",
    "image/webp",
    "image/bmp",
    "image/hdr",
    "image/dds",
    "image/qoi",
    "image/avif",
    "image/exr",
    "image/ff",
]

#/// Enable support for encoding_rs (modern, efficient)
encoding_rs = ["dep:encoding_rs"]

#/// Enable legacy encoding (original behavior)
legacy_encoding = ["dep:encoding"]

#/// Allows the ability to force ISO/IED 18004 compliance.
#/// Leave disabled unless specificially needed.
allow_forced_iso_ied_18004_compliance = []

#/// Enable support for writing SVG files
svg_write = ["dep:svg"]

#/// Enable support for reading SVG files
svg_read = ["dep:resvg", "image"]

#/// Enable support building this module in WASM
wasm_support = ["chrono/wasmbind"]

#/// Enable experimental features, risky.
experimental_features = []

#/// Adds support for serde Serialize and Deserialize for outward facing structs
serde = ["dep:serde"]

#/// Adds otsu binarizer support using imageproc
otsu_level = ["image"]

#/// Adds "client" features do decode many common data formats found in barcodes
client_support = []

#/// For the `FilteredImageReader` if this feature is enabled it
#/// will always reverse the order of pyramid scans
reverse_pyramid_layers = []

[workspace]
members = [
    "crates/one-d-proc-derive",
    "crates/cli"
]

[[bench]]
name = "benchmarks"
harness = false

[profile.release]
codegen-units = 1
lto = true
opt-level = 3