# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.88"
name = "pdf_oxide"
version = "0.3.69"
authors = ["Yury Fedoseev <yfedoseev@gmail.com>"]
build = false
include = [
    "/src/**/*",
    "/benches/**/*",
    "/Cargo.toml",
    "/LICENSE-MIT",
    "/LICENSE-APACHE",
    "/README.md",
    "/include/**/*",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "The fastest Rust PDF library with text extraction: 0.8ms mean, 100% pass rate on 3,830 PDFs. 5× faster than pdf_extract, 17× faster than oxidize_pdf. Extract, create, and edit PDFs."
homepage = "https://oxide.fyi"
documentation = "https://pdf.oxide.fyi/docs/getting-started/rust"
readme = "README.md"
keywords = [
    "pdf",
    "text-extraction",
    "pdf-parser",
    "pdf-to-markdown",
    "document-parser",
]
categories = [
    "parsing",
    "text-processing",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/yfedoseev/pdf_oxide"

[package.metadata.docs.rs]
features = [
    "python",
    "logging",
    "debug-span-merging",
    "parallel",
]
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[package.metadata.maturin]
name = "pdf_oxide"
python-source = "python"

[features]
barcodes = [
    "dep:qrcode",
    "dep:barcoders",
]
cjk-form-fonts = []
cjk-render-fallback = []
debug-span-merging = []
default = [
    "icc",
    "legacy-crypto",
]
fips = [
    "dep:aws-lc-rs",
    "aws-lc-rs/fips",
]
gpu = [
    "dep:ort",
    "ml",
]
icc = ["icc-qcms"]
icc-lcms2 = ["dep:lcms2"]
icc-qcms = ["dep:qcms"]
jpeg2000 = ["dep:hayro-jpeg2000"]
legacy-crypto = ["dep:md-5"]
logging = []
ml = [
    "ocr-tract",
    "dep:linfa",
    "dep:linfa-clustering",
    "dep:tokenizers",
]
ocr = [
    "dep:ort",
    "dep:imageproc",
    "dep:ndarray",
    "dep:ureq",
]
ocr-tract = [
    "dep:tract-onnx",
    "dep:ndarray",
]
parallel = ["dep:rayon"]
python = [
    "pyo3",
    "pyo3-log",
    "rendering",
    "parallel",
    "logging",
    "signatures",
    "tsa-client",
    "barcodes",
]
rendering = [
    "dep:tiny-skia",
    "dep:fast_image_resize",
    "system-fonts",
    "dep:hayro-jbig2",
    "jpeg2000",
]
signatures = [
    "dep:x509-parser",
    "dep:cms",
    "dep:rsa",
    "dep:der",
    "dep:spki",
    "dep:pkcs1",
    "dep:pkcs8",
    "dep:p12-keystore",
    "dep:signature",
    "dep:sha1",
    "dep:x509-tsp",
    "dep:sha2_v10",
    "dep:p256",
    "dep:p384",
]
system-fonts = [
    "dep:fontdb",
    "dep:rustybuzz",
]
table-ml = [
    "ml",
    "dep:pdfium-render",
]
test-support = []
tsa-client = [
    "signatures",
    "dep:ureq",
    "dep:cmpv2",
]
wasm = [
    "dep:wasm-bindgen",
    "dep:web-sys",
    "dep:js-sys",
    "dep:console_error_panic_hook",
    "dep:console_log",
    "dep:getrandom_02",
    "dep:serde-wasm-bindgen",
    "logging",
    "signatures",
    "barcodes",
]
wasm-ml = ["wasm-ocr"]
wasm-ocr = [
    "wasm",
    "ocr-tract",
    "dep:getrandom_03",
]

[lib]
name = "pdf_oxide"
crate-type = [
    "cdylib",
    "rlib",
    "staticlib",
]
path = "src/lib.rs"

[[bin]]
name = "analyze_gaps"
path = "src/bin/analyze_gaps.rs"

[[bin]]
name = "analyze_pdf_features"
path = "src/bin/analyze_pdf_features.rs"

[[bin]]
name = "benchmark_all_pdfs"
path = "src/bin/benchmark_all_pdfs.rs"

[[bin]]
name = "debug_extract"
path = "src/bin/debug_extract.rs"

[[bin]]
name = "debug_extract_text"
path = "src/bin/debug_extract_text.rs"

[[bin]]
name = "debug_extraction"
path = "src/bin/debug_extraction.rs"

[[bin]]
name = "export_to_html"
path = "src/bin/export_to_html.rs"

[[bin]]
name = "export_to_markdown"
path = "src/bin/export_to_markdown.rs"

[[bin]]
name = "export_to_text"
path = "src/bin/export_to_text.rs"

[[bin]]
name = "extract_with_pipeline"
path = "src/bin/extract_with_pipeline.rs"

[[bin]]
name = "extract_with_published_crate"
path = "src/bin/extract_with_published_crate.rs"

[[bin]]
name = "validate_content"
path = "src/bin/validate_content.rs"

[[bin]]
name = "validate_dataset"
path = "src/bin/validate_dataset.rs"

[[bin]]
name = "validate_structured"
path = "src/bin/validate_structured.rs"

[[bench]]
name = "cjk_benchmarks"
path = "benches/cjk_benchmarks.rs"
harness = false

[[bench]]
name = "complex_script_benchmarks"
path = "benches/complex_script_benchmarks.rs"
harness = false

[[bench]]
name = "full_pipeline_benchmarks"
path = "benches/full_pipeline_benchmarks.rs"
harness = false

[[bench]]
name = "ligature_benchmarks"
path = "benches/ligature_benchmarks.rs"
harness = false

[[bench]]
name = "pdf_extraction_performance"
path = "benches/pdf_extraction_performance.rs"
harness = false

[[bench]]
name = "rtl_benchmarks"
path = "benches/rtl_benchmarks.rs"
harness = false

[[bench]]
name = "script_detection_benchmarks"
path = "benches/script_detection_benchmarks.rs"
harness = false

[[bench]]
name = "streaming_table_scaling"
path = "benches/streaming_table_scaling.rs"
harness = false

[[bench]]
name = "word_boundary_benchmarks"
path = "benches/word_boundary_benchmarks.rs"
harness = false

[dependencies.aes]
version = "0.9"

[dependencies.aws-lc-rs]
version = "1"
features = ["fips"]
optional = true

[dependencies.barcoders]
version = "2.0"
features = ["image"]
optional = true

[dependencies.base64]
version = "0.22"

[dependencies.bitflags]
version = "2"

[dependencies.brotli]
version = "8"

[dependencies.byteorder]
version = "1.5"

[dependencies.bytes]
version = "1.5"

[dependencies.cbc]
version = "0.2"

[dependencies.chrono]
version = "0.4"

[dependencies.cmpv2]
version = "0.2"
optional = true

[dependencies.cms]
version = "0.2"
optional = true

[dependencies.console_error_panic_hook]
version = "0.1"
optional = true

[dependencies.console_log]
version = "1"
features = ["color"]
optional = true

[dependencies.der]
version = "0.7"
optional = true

[dependencies.encoding_rs]
version = "0.8"

[dependencies.env_logger]
version = "0.11"

[dependencies.fast_image_resize]
version = "6"
optional = true

[dependencies.fax]
version = "0.2"

[dependencies.flate2]
version = "1.1"
features = ["zlib-rs"]
default-features = false

[dependencies.fontdb]
version = "0.23"
optional = true

[dependencies.getrandom]
version = "0.4"

[dependencies.getrandom_02]
version = "0.2"
features = ["js"]
optional = true
package = "getrandom"

[dependencies.hayro-jbig2]
version = "0.3"
optional = true
default-features = false

[dependencies.hayro-jpeg2000]
version = "0.4"
optional = true
default-features = false

[dependencies.image]
version = "0.25"
features = [
    "png",
    "jpeg",
    "tiff",
]
default-features = false

[dependencies.imageproc]
version = "0.27.0"
optional = true

[dependencies.jpeg-decoder]
version = "0.3"

[dependencies.js-sys]
version = "0.3"
optional = true

[dependencies.lcms2]
version = "6"
optional = true

[dependencies.libc]
version = "0.2"

[dependencies.linfa]
version = "0.8"
optional = true

[dependencies.linfa-clustering]
version = "0.8"
optional = true

[dependencies.log]
version = "0.4"

[dependencies.md-5]
version = "0.11"
optional = true

[dependencies.memchr]
version = "2"

[dependencies.ndarray]
version = "0.17"
features = ["std"]
optional = true

[dependencies.nom]
version = "8.0"

[dependencies.office_oxide]
version = "0.1.2"
default-features = false

[dependencies.ort]
version = "=2.0.0-rc.11"
features = [
    "ndarray",
    "load-dynamic",
]
optional = true
default-features = false

[dependencies.p12-keystore]
version = "0.3.0"
optional = true

[dependencies.p256]
version = "0.13"
optional = true

[dependencies.p384]
version = "0.13"
optional = true

[dependencies.pdfium-render]
version = "0.9"
optional = true

[dependencies.phf]
version = "0.14"
features = ["macros"]

[dependencies.pkcs1]
version = "0.7"
optional = true

[dependencies.pkcs8]
version = "0.10"
optional = true

[dependencies.pyo3]
version = "0.29"
features = [
    "abi3-py38",
    "generate-import-lib",
]
optional = true

[dependencies.pyo3-log]
version = "0.13"
optional = true

[dependencies.qcms]
version = "0.3"
optional = true

[dependencies.qrcode]
version = "0.14"
optional = true

[dependencies.quick-xml]
version = "0.40"

[dependencies.rayon]
version = "1.12"
optional = true

[dependencies.regex]
version = "1.12"

[dependencies.rsa]
version = "0.9"
optional = true

[dependencies.rustybuzz]
version = "0.20"
optional = true

[dependencies.serde]
version = "1.0"
features = ["derive"]

[dependencies.serde-wasm-bindgen]
version = "0.6"
optional = true

[dependencies.serde_json]
version = "1.0"

[dependencies.sha1]
version = "0.11"
optional = true

[dependencies.sha2]
version = "0.11"

[dependencies.sha2_v10]
version = "0.10"
optional = true
package = "sha2"

[dependencies.signature]
version = "2.2"
optional = true

[dependencies.smallvec]
version = "1.13"

[dependencies.spki]
version = "0.7"
optional = true

[dependencies.stringprep]
version = "0.1"

[dependencies.subsetter]
version = "0.2"

[dependencies.taffy]
version = "0.11"
features = [
    "std",
    "taffy_tree",
    "block_layout",
    "flexbox",
    "grid",
]
default-features = false

[dependencies.thiserror]
version = "2.0"

[dependencies.tiny-skia]
version = "0.12"
optional = true

[dependencies.tokenizers]
version = "0.23"
features = ["onig"]
optional = true
default-features = false

[dependencies.tract-onnx]
version = "0.22"
optional = true

[dependencies.ttf-parser]
version = "0.25"

[dependencies.unicode-bidi]
version = "0.3"
default-features = false

[dependencies.unicode-linebreak]
version = "0.1"

[dependencies.unicode-normalization]
version = "0.1"

[dependencies.ureq]
version = "3"
features = ["rustls"]
optional = true
default-features = false

[dependencies.uuid]
version = "1.23"
features = [
    "v4",
    "js",
]

[dependencies.wasm-bindgen]
version = "0.2"
optional = true

[dependencies.web-sys]
version = "0.3"
features = ["console"]
optional = true

[dependencies.weezl]
version = "0.2"

[dependencies.x509-parser]
version = "0.18"
optional = true

[dependencies.x509-tsp]
version = "0.1"
optional = true

[dev-dependencies.crc32fast]
version = "1.3"

[dev-dependencies.hex-literal]
version = "1.1.0"

[dev-dependencies.jpeg-encoder]
version = "0.7.0"

[dev-dependencies.tempfile]
version = "3.27"

[dev-dependencies.wasm-bindgen-test]
version = "0.3"

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies.getrandom]
version = "0.4"
features = ["wasm_js"]

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies.getrandom_03]
version = "0.3"
features = ["wasm_js"]
optional = true
package = "getrandom"

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.criterion]
version = "0.8"

[lints.clippy]
collapsible_match = "allow"
doc_overindented_list_items = "allow"
enum_variant_names = "allow"
explicit_counter_loop = "allow"
manual_checked_ops = "allow"
manual_find = "allow"
match_like_matches_macro = "allow"
needless_range_loop = "allow"
redundant_guards = "allow"
regex_creation_in_loops = "allow"
should_implement_trait = "allow"
too_many_arguments = "allow"
type_complexity = "allow"
wrong_self_convention = "allow"

[profile.bench]
opt-level = 3
lto = true

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

[profile.release-small]
opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"
inherits = "release"
strip = true
