# 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 = "2024"
rust-version = "1.91"
name = "kreuzberg"
version = "4.4.2"
authors = ["Na'aman Hirschfeld <nhirschfeld@gmail.com>"]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "High-performance document intelligence library for Rust. Extract text, metadata, and structured data from PDFs, Office documents, images, and 75+ formats with async/sync APIs."
homepage = "https://kreuzberg.dev"
documentation = "https://docs.rs/kreuzberg"
readme = "README.md"
keywords = [
    "document",
    "extraction",
    "pdf",
    "ocr",
    "parser",
]
categories = [
    "parser-implementations",
    "text-processing",
]
license = "MIT"
repository = "https://github.com/kreuzberg-dev/kreuzberg"
resolver = "2"

[package.metadata.cargo-machete]
ignored = [
    "opentelemetry",
    "opentelemetry_sdk",
    "tracing-opentelemetry",
    "kamadak-exif",
]

[features]
api = [
    "dep:axum",
    "dep:tower",
    "dep:tower-http",
    "dep:utoipa",
    "tokio-runtime",
    "chunking",
]
archives = [
    "dep:zip",
    "dep:tar",
    "dep:sevenz-rust2",
    "dep:flate2",
]
bundled-pdfium = ["pdf"]
chunking = ["dep:text-splitter"]
default = [
    "tokio-runtime",
    "simd-utf8",
]
email = [
    "dep:mail-parser",
    "dep:cfb",
]
embeddings = [
    "dep:fastembed",
    "dep:reqwest",
    "chunking",
    "tokio-runtime",
]
excel = [
    "dep:calamine",
    "tokio-runtime",
]
excel-wasm = ["dep:calamine"]
full = [
    "pdf",
    "excel",
    "office",
    "email",
    "html",
    "xml",
    "archives",
    "ocr",
    "paddle-ocr",
    "language-detection",
    "chunking",
    "embeddings",
    "quality",
    "keywords",
    "mdx",
    "api",
    "mcp",
    "otel",
]
html = ["dep:html-to-markdown-rs"]
keywords = [
    "keywords-yake",
    "keywords-rake",
]
keywords-rake = [
    "dep:rake",
    "stopwords",
]
keywords-yake = [
    "dep:yake-rust",
    "stopwords",
]
language-detection = ["dep:whatlang"]
mcp = [
    "dep:rmcp",
    "tokio-runtime",
]
mcp-http = [
    "mcp",
    "api",
]
mdx = ["dep:pulldown-cmark"]
ocr = [
    "dep:kreuzberg-tesseract",
    "dep:image",
    "dep:tiff",
    "dep:fast_image_resize",
    "dep:kamadak-exif",
    "dep:hayro-jpeg2000",
    "dep:hayro-jbig2",
    "html",
]
ocr-wasm = [
    "dep:kreuzberg-tesseract",
    "dep:image",
    "dep:hayro-jpeg2000",
    "dep:hayro-jbig2",
]
office = [
    "dep:cfb",
    "dep:roxmltree",
    "dep:zip",
    "dep:quick-xml",
    "dep:pulldown-cmark",
    "dep:biblatex",
    "dep:biblib",
    "dep:org",
    "html",
]
otel = [
    "dep:opentelemetry",
    "dep:opentelemetry_sdk",
    "dep:tracing-opentelemetry",
]
paddle-ocr = [
    "dep:kreuzberg-paddle-ocr",
    "dep:sha2",
    "dep:image",
    "dep:hf-hub",
    "html",
    "tokio-runtime",
    "ocr",
]
pdf = [
    "dep:pdfium-render",
    "dep:lopdf",
    "dep:image",
]
pool-metrics = []
profiling = ["dep:pprof"]
quality = [
    "dep:unicode-normalization",
    "dep:chardetng",
    "stopwords",
]
server = [
    "pdf",
    "excel",
    "html",
    "ocr",
    "paddle-ocr",
    "chunking",
    "api",
    "mcp",
]
simd-utf8 = ["dep:simdutf8"]
static-pdfium = ["pdf"]
stopwords = []
system-pdfium = ["pdf"]
tokio-runtime = ["dep:tokio"]
wasm-target = [
    "pdf",
    "html",
    "xml",
    "email",
    "language-detection",
    "chunking",
    "quality",
    "office",
    "mdx",
    "excel-wasm",
    "archives",
]
wasm-threads = ["dep:wasm-bindgen-rayon"]
xml = [
    "dep:quick-xml",
    "dep:roxmltree",
]

[lib]
name = "kreuzberg"
crate-type = ["rlib"]
path = "src/lib.rs"

[[example]]
name = "bench_fixes"
path = "examples/bench_fixes.rs"

[[example]]
name = "download_paddle_models"
path = "examples/download_paddle_models.rs"

[[example]]
name = "test_pdfium_fork"
path = "examples/test_pdfium_fork.rs"

[[test]]
name = "api_chunk"
path = "tests/api_chunk.rs"

[[test]]
name = "api_consistency"
path = "tests/api_consistency.rs"

[[test]]
name = "api_embed"
path = "tests/api_embed.rs"

[[test]]
name = "api_extract_multipart"
path = "tests/api_extract_multipart.rs"

[[test]]
name = "api_large_pdf_extraction"
path = "tests/api_large_pdf_extraction.rs"

[[test]]
name = "api_large_pdf_extraction_diagnostics"
path = "tests/api_large_pdf_extraction_diagnostics.rs"

[[test]]
name = "api_tests"
path = "tests/api_tests.rs"

[[test]]
name = "archive_integration"
path = "tests/archive_integration.rs"

[[test]]
name = "batch_orchestration"
path = "tests/batch_orchestration.rs"

[[test]]
name = "batch_pooling_benchmark"
path = "tests/batch_pooling_benchmark.rs"

[[test]]
name = "batch_processing"
path = "tests/batch_processing.rs"

[[test]]
name = "bibtex_parity_test"
path = "tests/bibtex_parity_test.rs"

[[test]]
name = "concurrency_stress"
path = "tests/concurrency_stress.rs"

[[test]]
name = "config_behavioral"
path = "tests/config_behavioral.rs"

[[test]]
name = "config_features"
path = "tests/config_features.rs"

[[test]]
name = "config_integration_test"
path = "tests/config_integration_test.rs"

[[test]]
name = "config_loading_tests"
path = "tests/config_loading_tests.rs"

[[test]]
name = "content_parity_debug"
path = "tests/content_parity_debug.rs"

[[test]]
name = "contract_mcp"
path = "tests/contract_mcp.rs"

[[test]]
name = "core_integration"
path = "tests/core_integration.rs"

[[test]]
name = "csv_integration"
path = "tests/csv_integration.rs"

[[test]]
name = "debug_table_cells"
path = "tests/debug_table_cells.rs"

[[test]]
name = "docbook_extractor_tests"
path = "tests/docbook_extractor_tests.rs"

[[test]]
name = "docx_formatting_test"
path = "tests/docx_formatting_test.rs"

[[test]]
name = "docx_metadata_extraction_test"
path = "tests/docx_metadata_extraction_test.rs"

[[test]]
name = "docx_mime_detection_test"
path = "tests/docx_mime_detection_test.rs"

[[test]]
name = "docx_vs_pandoc_comparison"
path = "tests/docx_vs_pandoc_comparison.rs"

[[test]]
name = "dump_pdf_markdown"
path = "tests/dump_pdf_markdown.rs"

[[test]]
name = "email_integration"
path = "tests/email_integration.rs"

[[test]]
name = "epub_native_extractor_tests"
path = "tests/epub_native_extractor_tests.rs"

[[test]]
name = "error_handling"
path = "tests/error_handling.rs"

[[test]]
name = "fictionbook_extractor_tests"
path = "tests/fictionbook_extractor_tests.rs"

[[test]]
name = "format_integration"
path = "tests/format_integration.rs"

[[test]]
name = "html_table_test"
path = "tests/html_table_test.rs"

[[test]]
name = "image_integration"
path = "tests/image_integration.rs"

[[test]]
name = "instrumentation_test"
path = "tests/instrumentation_test.rs"

[[test]]
name = "issue_350_regression_test"
path = "tests/issue_350_regression_test.rs"

[[test]]
name = "issue_359_list_whitespace_test"
path = "tests/issue_359_list_whitespace_test.rs"

[[test]]
name = "jats_extractor_tests"
path = "tests/jats_extractor_tests.rs"

[[test]]
name = "jupyter_extractor_tests"
path = "tests/jupyter_extractor_tests.rs"

[[test]]
name = "keywords_integration"
path = "tests/keywords_integration.rs"

[[test]]
name = "keywords_quality"
path = "tests/keywords_quality.rs"

[[test]]
name = "latex_extractor_tests"
path = "tests/latex_extractor_tests.rs"

[[test]]
name = "markdown_extractor_tests"
path = "tests/markdown_extractor_tests.rs"

[[test]]
name = "mcp_integration"
path = "tests/mcp_integration.rs"

[[test]]
name = "mime_detection"
path = "tests/mime_detection.rs"

[[test]]
name = "ocr_configuration"
path = "tests/ocr_configuration.rs"

[[test]]
name = "ocr_errors"
path = "tests/ocr_errors.rs"

[[test]]
name = "ocr_language_registry"
path = "tests/ocr_language_registry.rs"

[[test]]
name = "ocr_quality"
path = "tests/ocr_quality.rs"

[[test]]
name = "ocr_stress"
path = "tests/ocr_stress.rs"

[[test]]
name = "ocr_table_inline"
path = "tests/ocr_table_inline.rs"

[[test]]
name = "odt_extractor_tests"
path = "tests/odt_extractor_tests.rs"

[[test]]
name = "opml_extractor_tests"
path = "tests/opml_extractor_tests.rs"

[[test]]
name = "orgmode_extractor_tests"
path = "tests/orgmode_extractor_tests.rs"

[[test]]
name = "paddle_ocr_integration"
path = "tests/paddle_ocr_integration.rs"

[[test]]
name = "paddle_ocr_multilang"
path = "tests/paddle_ocr_multilang.rs"

[[test]]
name = "page_markers"
path = "tests/page_markers.rs"

[[test]]
name = "pdf_hierarchy_detection"
path = "tests/pdf_hierarchy_detection.rs"

[[test]]
name = "pdf_hierarchy_quality"
path = "tests/pdf_hierarchy_quality.rs"

[[test]]
name = "pdf_integration"
path = "tests/pdf_integration.rs"

[[test]]
name = "pdf_markdown_all_docs"
path = "tests/pdf_markdown_all_docs.rs"

[[test]]
name = "pdf_markdown_extraction"
path = "tests/pdf_markdown_extraction.rs"

[[test]]
name = "pdf_markdown_regression"
path = "tests/pdf_markdown_regression.rs"

[[test]]
name = "pdf_ocr_triggering"
path = "tests/pdf_ocr_triggering.rs"

[[test]]
name = "pdf_table_detection"
path = "tests/pdf_table_detection.rs"

[[test]]
name = "pdf_table_ground_truth"
path = "tests/pdf_table_ground_truth.rs"

[[test]]
name = "pdf_text_merging"
path = "tests/pdf_text_merging.rs"

[[test]]
name = "pdfium_linking"
path = "tests/pdfium_linking.rs"

[[test]]
name = "pipeline_integration"
path = "tests/pipeline_integration.rs"

[[test]]
name = "plugin_ocr_backend_test"
path = "tests/plugin_ocr_backend_test.rs"

[[test]]
name = "plugin_postprocessor_test"
path = "tests/plugin_postprocessor_test.rs"

[[test]]
name = "plugin_system"
path = "tests/plugin_system.rs"

[[test]]
name = "plugin_validator_test"
path = "tests/plugin_validator_test.rs"

[[test]]
name = "pptx_regression_tests"
path = "tests/pptx_regression_tests.rs"

[[test]]
name = "registry_integration_tests"
path = "tests/registry_integration_tests.rs"

[[test]]
name = "rst_extractor_tests"
path = "tests/rst_extractor_tests.rs"

[[test]]
name = "rtf_extractor_tests"
path = "tests/rtf_extractor_tests.rs"

[[test]]
name = "security_validation"
path = "tests/security_validation.rs"

[[test]]
name = "serialization_integration"
path = "tests/serialization_integration.rs"

[[test]]
name = "stopwords_integration_test"
path = "tests/stopwords_integration_test.rs"

[[test]]
name = "test_fastembed"
path = "tests/test_fastembed.rs"

[[test]]
name = "typst_behavioral_tests"
path = "tests/typst_behavioral_tests.rs"

[[test]]
name = "typst_extractor_tests"
path = "tests/typst_extractor_tests.rs"

[[test]]
name = "xlsb_extraction_test"
path = "tests/xlsb_extraction_test.rs"

[[test]]
name = "xlsx_metadata_extraction_test"
path = "tests/xlsx_metadata_extraction_test.rs"

[dependencies.ahash]
version = "0.8.12"

[dependencies.async-trait]
version = "0.1.89"

[dependencies.axum]
version = "0.8"
features = [
    "macros",
    "json",
    "multipart",
]
optional = true

[dependencies.base64]
version = "0.22.1"

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

[dependencies.biblib]
version = "0.4"
features = [
    "ris",
    "pubmed",
    "xml",
    "regex",
]
optional = true
default-features = false

[dependencies.bitvec]
version = "1.0"

[dependencies.bytes]
version = "1"
features = ["serde"]

[dependencies.calamine]
version = "0.33.0"
features = ["dates"]
optional = true

[dependencies.cfb]
version = "0.14.0"
optional = true

[dependencies.chardetng]
version = "0.1.17"
optional = true

[dependencies.dashmap]
version = "6.1"

[dependencies.encoding_rs]
version = "0.8.35"

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

[dependencies.flate2]
version = "1.1"
optional = true

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

[dependencies.hayro-jpeg2000]
version = "0.3"
features = [
    "std",
    "simd",
]
optional = true
default-features = false

[dependencies.hex]
version = "0.4.3"

[dependencies.html-to-markdown-rs]
version = "2.27.2"
features = [
    "inline-images",
    "metadata",
]
optional = true
default-features = false

[dependencies.image]
version = "0.25.9"
features = [
    "png",
    "jpeg",
    "webp",
    "bmp",
    "tiff",
    "gif",
    "pnm",
    "rayon",
]
optional = true
default-features = false

[dependencies.indexmap]
version = "2.13.0"

[dependencies.infer]
version = "0.19.0"

[dependencies.jotdown]
version = "0.9"

[dependencies.kamadak-exif]
version = "0.6.1"
optional = true

[dependencies.kreuzberg-tesseract]
version = "4.3"
optional = true

[dependencies.lazy_static]
version = "1.5.0"

[dependencies.libc]
version = "0.2.182"

[dependencies.lopdf]
version = "0.39.0"
optional = true

[dependencies.mail-parser]
version = "0.11.2"
optional = true

[dependencies.memchr]
version = "2.8.0"

[dependencies.mime_guess]
version = "2.0"

[dependencies.num_cpus]
version = "1.17.0"

[dependencies.once_cell]
version = "1.21.3"

[dependencies.opentelemetry]
version = "0.31"
features = ["trace"]
optional = true

[dependencies.opentelemetry_sdk]
version = "0.31"
features = ["rt-tokio"]
optional = true

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

[dependencies.parking_lot]
version = "0.12.5"

[dependencies.pastey]
version = "0.2"

[dependencies.pdfium-render]
version = "4.3"
features = [
    "thread_safe",
    "image_latest",
]
optional = true
package = "kreuzberg-pdfium-render"

[dependencies.pulldown-cmark]
version = "0.13"
optional = true

[dependencies.quick-xml]
version = "0.39.2"
features = ["serialize"]
optional = true

[dependencies.rake]
version = "0.3.6"
optional = true

[dependencies.rayon]
version = "1.11.0"

[dependencies.regex]
version = "1.12.3"

[dependencies.rmcp]
version = "1.1.0"
features = [
    "server",
    "macros",
    "base64",
    "transport-io",
    "transport-streamable-http-server",
    "server-side-http",
]
optional = true

[dependencies.rmp-serde]
version = "1.3"

[dependencies.roxmltree]
version = "0.21.1"
optional = true

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

[dependencies.serde_json]
version = "1.0.149"

[dependencies.serde_yaml_ng]
version = "0.10.0"

[dependencies.sevenz-rust2]
version = "0.20.2"
optional = true

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

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

[dependencies.tar]
version = "0.4.44"
optional = true

[dependencies.text-splitter]
version = "0.29.3"
features = ["markdown"]
optional = true

[dependencies.thiserror]
version = "2.0.18"

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

[dependencies.tokio]
version = "1.50.0"
features = [
    "rt",
    "rt-multi-thread",
    "macros",
    "sync",
    "process",
    "fs",
    "time",
    "io-util",
]
optional = true

[dependencies.toml]
version = "1.0.3"

[dependencies.tower]
version = "0.5"
optional = true

[dependencies.tower-http]
version = "0.6"
features = [
    "cors",
    "trace",
    "limit",
]
optional = true

[dependencies.tracing]
version = "0.1"

[dependencies.tracing-opentelemetry]
version = "0.32"
optional = true

[dependencies.unicode-normalization]
version = "0.1.25"
optional = true

[dependencies.utoipa]
version = "5.4"
features = ["axum_extras"]
optional = true

[dependencies.whatlang]
version = "0.18.0"
optional = true

[dependencies.yake-rust]
version = "1.0.3"
optional = true

[dependencies.zip]
version = "8.2.0"
features = ["deflate-flate2"]
optional = true
default-features = false

[dev-dependencies.anyhow]
version = "1.0"

[dev-dependencies.criterion]
version = "0.8"
features = ["html_reports"]

[dev-dependencies.filetime]
version = "0.2"

[dev-dependencies.image]
version = "0.25.9"
features = ["png"]
default-features = false

[dev-dependencies.serial_test]
version = "3.4.0"

[dev-dependencies.tar]
version = "0.4.44"

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

[dev-dependencies.tokio-test]
version = "0.4"

[dev-dependencies.tracing-subscriber]
version = "0.3"
features = ["env-filter"]

[dev-dependencies.zip]
version = "8.2.0"
features = ["deflate-flate2"]
default-features = false

[build-dependencies.pkg-config]
version = "0.3"

[build-dependencies.tracing]
version = "0.1"

[target.'cfg(all(not(target_os = "windows"), not(target_arch = "wasm32")))'.dependencies.fastembed]
version = "5.11"
features = [
    "hf-hub-rustls-tls",
    "ort-load-dynamic",
]
optional = true
default-features = false

[target.'cfg(all(not(target_os = "windows"), not(target_arch = "wasm32")))'.dependencies.hf-hub]
version = "0.5"
features = ["ureq"]
optional = true
default-features = false

[target.'cfg(all(not(target_os = "windows"), not(target_arch = "wasm32")))'.dependencies.kreuzberg-paddle-ocr]
version = "4.3"
optional = true

[target.'cfg(all(not(target_os = "windows"), not(target_arch = "wasm32")))'.dependencies.pprof]
version = "0.15.0"
features = ["flamegraph"]
optional = true

[target.'cfg(all(not(target_os = "windows"), not(target_arch = "wasm32")))'.dependencies.reqwest]
version = "0.13.2"
features = [
    "json",
    "rustls",
    "blocking",
]
optional = true
default-features = false

[target.'cfg(all(not(target_os = "windows"), not(target_arch = "wasm32")))'.dependencies.ureq]
version = "3.2"
features = [
    "rustls",
    "json",
]
default-features = false

[target.'cfg(all(target_os = "windows", not(target_arch = "wasm32")))'.dependencies.fastembed]
version = "5.11"
features = [
    "hf-hub-native-tls",
    "ort-load-dynamic",
]
optional = true
default-features = false

[target.'cfg(all(target_os = "windows", not(target_arch = "wasm32")))'.dependencies.hf-hub]
version = "0.5"
features = ["ureq"]
optional = true
default-features = false

[target.'cfg(all(target_os = "windows", not(target_arch = "wasm32")))'.dependencies.kreuzberg-paddle-ocr]
version = "4.3"
optional = true

[target.'cfg(all(target_os = "windows", not(target_arch = "wasm32")))'.dependencies.reqwest]
version = "0.13.2"
features = [
    "json",
    "native-tls",
    "blocking",
]
optional = true
default-features = false

[target.'cfg(all(target_os = "windows", not(target_arch = "wasm32")))'.dependencies.ureq]
version = "3.2"
features = [
    "native-tls",
    "json",
]
default-features = false

[target.'cfg(target_arch = "wasm32")'.dependencies.getrandom]
version = "0.4.2"
features = ["wasm_js"]

[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen-rayon]
version = "1.3"
optional = true
