Merge pull request 'bread-onnx: fix workspace test build with load-dynamic dev-dependency' (#3) from fix/bread-onnx-workspace-test-link into main
Some checks failed
dev bread-theme / build (push) Successful in 18s
dev bakery / build (push) Has been cancelled

Reviewed-on: #3
This commit is contained in:
Breadway 2026-08-07 11:20:41 +08:00
commit 6057ed39b0
2 changed files with 20 additions and 0 deletions

11
Cargo.lock generated
View file

@ -1337,6 +1337,16 @@ version = "0.2.186"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
[[package]]
name = "libloading"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "754ca22de805bb5744484a5b151a9e1a8e837d5dc232c2d7d8c2e3492edc8b60"
dependencies = [
"cfg-if",
"windows-link",
]
[[package]] [[package]]
name = "libredox" name = "libredox"
version = "0.1.18" version = "0.1.18"
@ -1563,6 +1573,7 @@ version = "2.0.0-rc.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7de3af33d24a745ffb8fab904b13478438d1cd52868e6f17735ef6e1f8bf133" checksum = "d7de3af33d24a745ffb8fab904b13478438d1cd52868e6f17735ef6e1f8bf133"
dependencies = [ dependencies = [
"libloading",
"ndarray", "ndarray",
"ort-sys", "ort-sys",
"smallvec", "smallvec",

View file

@ -32,3 +32,12 @@ anyhow = { workspace = true }
[dev-dependencies] [dev-dependencies]
tempfile = "3" 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"] }