bread-onnx: fix workspace test build with load-dynamic dev-dependency
cargo test --workspace failed to link bread-onnx's own unit tests (undefined symbol OrtGetApiBase) because nothing in this workspace supplies an ort backend — that's deliberately left to each downstream consumer app (breadarr, breadmill, breadpad) in their own repos. None of bread-onnx's unit tests actually open an ONNX session, so enabling ort's load-dynamic feature as a dev-dependency (unifies into this crate's own test builds only, never into downstream consumers) is enough to satisfy the linker without requiring a real onnxruntime.
This commit is contained in:
parent
147cfbbf96
commit
b907b92faf
2 changed files with 20 additions and 0 deletions
|
|
@ -32,3 +32,12 @@ anyhow = { workspace = true }
|
|||
|
||||
[dev-dependencies]
|
||||
tempfile = "3"
|
||||
# Dev-dependency features unify into this crate's own test/bench builds
|
||||
# only, never into downstream consumers (they aren't part of the dependency
|
||||
# graph a consuming app resolves) — so this doesn't compromise the
|
||||
# consumer-chooses-the-backend policy above. Without it, `cargo test` here
|
||||
# fails at link time (undefined OrtGetApiBase) because nothing in this
|
||||
# workspace supplies a backend; none of bread-onnx's own unit tests open a
|
||||
# real ONNX session, so `load-dynamic` (dlopen at runtime, no static link)
|
||||
# is enough to satisfy the linker.
|
||||
ort = { version = "2.0.0-rc.12", default-features = false, features = ["std", "tracing", "load-dynamic", "api-24"] }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue