# 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.2.4"
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 50+ 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"

[features]
api = [
    "dep:axum",
    "dep:tower",
    "dep:tower-http",
    "dep:utoipa",
    "tokio-runtime",
]
archives = [
    "dep:zip",
    "dep:tar",
    "dep:sevenz-rust2",
    "dep:lzma-rust2",
]
bundled-pdfium = ["pdf"]
chunking = ["dep:text-splitter"]
cli = [
    "static-pdfium",
    "excel",
    "office",
    "html",
    "ocr",
    "language-detection",
    "chunking",
    "quality",
]
default = [
    "tokio-runtime",
    "simd-utf8",
]
email = [
    "dep:mail-parser",
    "dep:msg_parser",
]
embeddings = [
    "dep:fastembed",
    "dep:reqwest",
    "chunking",
    "tokio-runtime",
]
excel = [
    "dep:calamine",
    "dep:polars",
    "tokio-runtime",
]
full = [
    "pdf",
    "excel",
    "office",
    "email",
    "html",
    "xml",
    "archives",
    "ocr",
    "language-detection",
    "chunking",
    "embeddings",
    "quality",
    "keywords",
    "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",
]
ocr = [
    "dep:kreuzberg-tesseract",
    "dep:image",
    "dep:tiff",
    "dep:fast_image_resize",
    "dep:ndarray",
    "dep:kamadak-exif",
    "html",
]
office = [
    "dep:roxmltree",
    "dep:zip",
    "dep:docx-lite",
    "dep:quick-xml",
    "dep:pulldown-cmark",
    "dep:biblatex",
    "dep:org",
    "dep:rtf-parser",
    "dep:rst_parser",
    "dep:fb2",
    "dep:typst-syntax",
    "html",
    "tokio-runtime",
]
otel = [
    "dep:opentelemetry",
    "dep:opentelemetry_sdk",
    "dep:tracing-opentelemetry",
]
pdf = [
    "dep:pdfium-render",
    "dep:lopdf",
    "dep:image",
]
pool-metrics = []
profiling = ["dep:pprof"]
quality = [
    "dep:unicode-normalization",
    "dep:chardetng",
    "dep:encoding_rs",
    "stopwords",
]
server = [
    "static-pdfium",
    "excel",
    "html",
    "ocr",
    "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",
]
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 = "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 = "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 = "docbook_extractor_tests"
path = "tests/docbook_extractor_tests.rs"

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

[[test]]
name = "docx_vs_pandoc_comparison"
path = "tests/docx_vs_pandoc_comparison.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 = "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 = "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 = "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_ocr_triggering"
path = "tests/pdf_ocr_triggering.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 = "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.base64-simd]
version = "0.8"

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

[dependencies.bitvec]
version = "1.0"

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

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

[dependencies.dashmap]
version = "6.1"

[dependencies.dirs]
version = "6.0"

[dependencies.docx-lite]
version = "0.2.0"
optional = true

[dependencies.encoding_rs]
version = "0.8.35"
optional = true

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

[dependencies.fb2]
version = "0.4"
optional = true

[dependencies.hex]
version = "0.4.3"

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

[dependencies.image]
version = "0.25.9"
features = [
    "png",
    "jpeg",
    "webp",
    "bmp",
    "tiff",
    "gif",
    "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.1"
optional = true

[dependencies.lazy_static]
version = "1.5.0"

[dependencies.libc]
version = "0.2.180"

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

[dependencies.lzma-rust2]
version = "0.15.7"
optional = true

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

[dependencies.memchr]
version = "2.7.6"

[dependencies.mime_guess]
version = "2.0"

[dependencies.msg_parser]
version = "0.1.1"
optional = true

[dependencies.ndarray]
version = "0.17.2"
optional = true

[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 = "0.9.0"
features = [
    "thread_safe",
    "image_latest",
]
optional = true
package = "kreuzberg-pdfium-render"

[dependencies.polars]
version = "0.52.0"
features = ["ipc"]
optional = true
default-features = false

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

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

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

[dependencies.rayon]
version = "1.11.0"

[dependencies.regex]
version = "1.12.2"

[dependencies.rmcp]
version = "0.14.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.rst_parser]
version = "0.4"
optional = true

[dependencies.rtf-parser]
version = "0.4"
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.1"
optional = true

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

[dependencies.smartcore]
version = "0.4"
features = ["serde"]
default-features = false

[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.49.0"
features = [
    "rt",
    "rt-multi-thread",
    "macros",
    "sync",
    "process",
    "fs",
    "time",
    "io-util",
]
optional = true

[dependencies.toml]
version = "0.9.11"

[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.typst-syntax]
version = "0.14"
optional = true

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

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

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

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

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

[dependencies.zip]
version = "7.2.0"
optional = true

[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.3.1"

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

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

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

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

[dev-dependencies.zip]
version = "7.2.0"

[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.8"
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.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.1"
features = [
    "json",
    "rustls",
]
optional = true
default-features = false

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

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

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

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

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

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