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.
43 lines
2.3 KiB
TOML
43 lines
2.3 KiB
TOML
[package]
|
|
name = "bread-onnx"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
authors.workspace = true
|
|
description = "Shared ONNX Runtime plumbing for the bread ecosystem: session building, execution-provider fallback with loud diagnostics, embedding-pipeline tensor math, and verified model downloads"
|
|
repository = "https://git.breadway.dev/Breadway/bread-ecosystem"
|
|
keywords = ["onnx", "onnxruntime", "ml", "embeddings"]
|
|
|
|
[dependencies]
|
|
bread-utils = { path = "../bread-utils" }
|
|
# Left at default-features = false, with no api-XX/download-binaries/
|
|
# load-dynamic/tls-native features of our own: those choices (how each app
|
|
# obtains/links its onnxruntime .so, and which ONNX Runtime C API version to
|
|
# bind) are consumer-build-environment decisions that stay in each app's own
|
|
# Cargo.toml (breadarr, breadmill, and breadpad already each pin different
|
|
# ones). Cargo's feature unification means this crate's minimal declaration
|
|
# just rides along with whatever the consuming app already selected.
|
|
ort = { version = "2.0.0-rc.12", default-features = false, features = ["std", "tracing"] }
|
|
# Default features left on (unlike `ort` above) — breadarr and breadmill
|
|
# both already build against plain default-featured tokenizers; only
|
|
# breadpad customizes this (http, fancy-regex), and Cargo's feature
|
|
# unification only ever adds features on top of this minimal baseline, so
|
|
# breadpad's own selection still applies in its own build.
|
|
tokenizers = "0.23"
|
|
tracing = { workspace = true }
|
|
ureq = { workspace = true }
|
|
sha2 = { workspace = true }
|
|
hex = { workspace = true }
|
|
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"] }
|