franken_ocr 0.9.0

Pure-Rust, CPU-hyper-optimized runner for the Baidu Unlimited-OCR model (single-binary CLI: focr)
# 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"
name = "franken_ocr"
version = "0.9.0"
build = false
include = [
    "src/**",
    "Cargo.toml",
    "README.md",
    "LICENSE",
    "rust-toolchain.toml",
    "models/manifest-v2.json",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Pure-Rust, CPU-hyper-optimized runner for the Baidu Unlimited-OCR model (single-binary CLI: focr)"
readme = "README.md"
license-file = "LICENSE"
repository = "https://github.com/Dicklesworthstone/franken_ocr"

[features]
default = ["native"]
mimalloc = []
mmap = ["dep:memmap2"]
native = [
    "dep:asupersync",
    "dep:clap",
    "dep:ctrlc",
    "dep:fsqlite",
    "dep:fsqlite-types",
    "dep:uuid",
    "mmap",
    "pdf",
    "image/default",
    "image/rayon",
]
pdf = [
    "dep:lopdf",
    "dep:fax",
    "dep:flate2",
    "dep:getrandom",
]

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

[[bin]]
name = "focr"
path = "src/bin/focr.rs"
required-features = ["native"]

[[bin]]
name = "franken_ocr"
path = "src/main.rs"
required-features = ["native"]

[dependencies.anyhow]
version = "1"

[dependencies.asupersync]
version = ">=0.3.5, <0.4"
features = ["tls-webpki-roots"]
optional = true
default-features = false

[dependencies.bytemuck]
version = "1"
default-features = false

[dependencies.clap]
version = "4.5"
features = [
    "derive",
    "env",
]
optional = true

[dependencies.ctrlc]
version = "3.4"
optional = true

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

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

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

[dependencies.fsqlite-types]
version = "0.3.6"
optional = true

[dependencies.ft-core]
version = "0.1.0"
package = "frankentorch-core"

[dependencies.ft-kernel-cpu]
version = "0.1.0"
package = "frankentorch-kernel-cpu"

[dependencies.half]
version = "2"
features = ["std"]

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

[dependencies.lopdf]
version = "0.43"
optional = true
default-features = false

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

[dependencies.num_cpus]
version = "1.16"

[dependencies.rayon]
version = "1"

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

[dependencies.serde_json]
version = "1"

[dependencies.sha2]
version = "0.10"

[dependencies.thiserror]
version = "2"

[dependencies.uuid]
version = "1"
features = ["v4"]
optional = true

[dev-dependencies.proptest]
version = "1"

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

[target.'cfg(target_arch = "wasm32")'.dependencies.web-time]
version = "1"

[target.'cfg(target_vendor = "apple")'.dependencies.libc]
version = "0.2"

[lints.rust]
unsafe_code = "deny"

[profile.dev.package.frankentorch-kernel-cpu]
opt-level = 3
debug-assertions = false

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

[profile.release-perf]
opt-level = 3
lto = "thin"
codegen-units = 1
debug = "line-tables-only"
inherits = "release"
strip = false