Documentation
[package]
name = "ocrs"
version = "0.13.0"
edition = "2021"
authors = ["Robert Knight"]
description = "OCR engine"
license = "MIT OR Apache-2.0"
homepage = "https://github.com/robertknight/ocrs"
repository = "https://github.com/robertknight/ocrs"

[dependencies]
anyhow = "1.0.102"
rayon = "1.12.0"
rten = { workspace = true }
rten-imageproc = { workspace = true }
rten-tensor = { workspace = true }
thiserror = "2.0.18"

[target.'cfg(target_arch = "wasm32")'.dependencies]
# nb. When changing this, make sure the version of wasm-bindgen-cli installed
# in CI etc. is in sync.
wasm-bindgen = "0.2.93"

[dev-dependencies]
fastrand = "2.4.1"
image = { version = "0.25.10", default-features = false, features = ["png", "jpeg", "webp"] }
lexopt = "0.3.2"
rten = { workspace = true }

[features]
default = ["export-wasm", "rten"]
# Enables wasm API (i.e. exposes ocrs API to JS)
export-wasm = []
# Enables loading custom models in ONNX format
onnx = ["rten/onnx_format"]
# Enables loading custom models in rten format
rten = ["rten/rten_format"]

[lib]
crate-type = ["lib", "cdylib"]