# 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"
name = "ocr"
version = "0.1.1"
authors = ["Ying Kit WONG"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A pure Rust CLI OCR tool for printed text extraction"
homepage = "https://github.com/yingkitw/ocr"
documentation = "https://docs.rs/ocr"
readme = "README.md"
license = "Apache-2.0"
repository = "https://github.com/yingkitw/ocr"

[features]
cuda = ["dep:cudarc"]
default = ["simd"]
opencl = ["dep:ocl"]
opencv = []
pdf = ["dep:pdf"]
simd = []
web-api = [
    "dep:axum",
    "dep:tower",
    "dep:tower-http",
    "dep:multer",
]

[lib]
name = "ocr"
path = "src/lib.rs"

[[bin]]
name = "ocr"
path = "src/main.rs"

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[dependencies.anyhow]
version = "1.0"

[dependencies.axum]
version = "0.7"
features = ["multipart"]
optional = true

[dependencies.blake3]
version = "1.5"

[dependencies.chrono]
version = "0.4"
features = ["serde"]

[dependencies.clap]
version = "4"
features = ["derive"]

[dependencies.cudarc]
version = "0.12"
features = ["cuda-12040"]
optional = true

[dependencies.fastrand]
version = "2.0"

[dependencies.futures]
version = "0.3"

[dependencies.image]
version = "0.24"

[dependencies.imageproc]
version = "0.23"

[dependencies.multer]
version = "3"
optional = true

[dependencies.nalgebra]
version = "0.32"

[dependencies.ndarray]
version = "0.15"

[dependencies.num_cpus]
version = "1.0"

[dependencies.ocl]
version = "0.19"
optional = true

[dependencies.pdf]
version = "0.9"
optional = true
default-features = false

[dependencies.printpdf]
version = "0.9.1"
features = ["images"]

[dependencies.rand]
version = "0.8"

[dependencies.rayon]
version = "1.8"

[dependencies.rusttype]
version = "0.9"

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

[dependencies.serde_json]
version = "1.0"

[dependencies.sha2]
version = "0.10"

[dependencies.thiserror]
version = "1.0"

[dependencies.tokio]
version = "1.0"
features = ["full"]

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

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

[dependencies.tracing]
version = "0.1"

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

[dev-dependencies.assert_cmd]
version = "2.0"

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

[dev-dependencies.predicates]
version = "3.0"

[dev-dependencies.reqwest]
version = "0.12"
features = [
    "multipart",
    "json",
]

[dev-dependencies.rusttype]
version = "0.9"

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

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