Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ members = [
]

[workspace.dependencies]
rten = { version = "0.24.0", default-features = false, features = ["rten_format"] }
rten = { version = "0.24.0", default-features = false }
rten-imageproc = { version = "0.24.0" }
rten-tensor = { version = "0.24.0" }
2 changes: 1 addition & 1 deletion ocrs-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ serde_json = "1.0.149"
rten = { workspace = true }
rten-imageproc = { workspace = true }
rten-tensor = { workspace = true }
ocrs = { path = "../ocrs", version = "0.12.2" }
ocrs = { path = "../ocrs", version = "0.12.2", features = ["rten"] }
lexopt = "0.3.2"
url = "2.5.4"
anyhow = "1.0.102"
Expand Down
5 changes: 5 additions & 0 deletions ocrs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ 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"]
2 changes: 1 addition & 1 deletion ocrs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ mod test_util;

mod text_items;

#[cfg(target_arch = "wasm32")]
#[cfg(all(feature = "export-wasm", target_arch = "wasm32"))]
mod wasm_api;

use detection::{TextDetector, TextDetectorParams};
Expand Down
Loading