Skip to main content

7.1 Workspace and crate manifests

# Cargo.toml (workspace root)
[workspace]
resolver = "3"
members = ["app", "migration", "crates/*"]

[workspace.package]
edition = "2024"
license = "Apache-2.0"
rust-version = "1.97" # max(loco 1.94, rig 0.46 — VERIFY)

[workspace.dependencies]
# --- application framework ---
loco-rs = { version = "=1.3.1", default-features = false, features = [
"cli", "auth", "with-db", "db-postgres", "worker", "cache_inmem", "multi-tenancy",
] } # no db-sqlite, no worker_redis
sea-orm = { version = "2.0", features = ["sqlx-postgres", "runtime-tokio-rustls", "macros", "with-uuid", "with-chrono", "with-json"] }
sea-orm-migration = { version = "2.0", features = ["sqlx-postgres", "runtime-tokio-rustls"] }
axum = { version = "0.8", features = ["macros"] }
tokio = { version = "1", features = ["full"] }
# --- workflow engine and YAML ---
graph-flow = { version = "=0.8.1", default-features = false } # no postgres (sqlx 0.8), no rig (rig-core 0.42)
serde_yaml_ng = "0.10" # same YAML parser Loco uses
tera = "2.1" # renders definition files the same way Loco renders config
jsonschema = "0.30" # VERIFY version; validates LLM output against schemas/*.yaml
schemars = "1"
# --- LLM ---
rig-core = { version = "=0.46.0", default-features = false, features = ["reqwest"] }
rig-agent = { version = "=0.46.0", default-features = false }
rig-reqwest = { version = "=0.46.0", default-features = false }
reqwest = { version = "0.13", default-features = false, features = ["json", "multipart", "rustls-tls", "http2"] } # VERIFY: must match the reqwest version rig-reqwest uses
# --- telemetry ---
opentelemetry = "0.31" # VERIFY latest compatible set
opentelemetry_sdk = { version = "0.31", features = ["rt-tokio"] }
opentelemetry-otlp = { version = "0.31", features = ["grpc-tonic"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
tracing-opentelemetry = "0.32"
# --- shared ---
serde = { version = "1", features = ["derive"] }
serde_json = "1"
async-trait = "0.1"
async-stream = "0.3"
futures = "0.3"
thiserror = "2"
anyhow = "1"
uuid = { version = "1", features = ["v7", "serde"] }
chrono = { version = "0.4", features = ["serde"] }
backon = "1" # retries with backoff
# app/Cargo.toml
[package]
name = "bo-app"
version = "0.1.0"
edition.workspace = true
license.workspace = true
default-run = "bo-app"

[[bin]]
name = "bo-app"
path = "src/bin/main.rs"

[dependencies]
loco-rs.workspace = true
migration = { path = "../migration" }
bo-core = { path = "../crates/core" }
bo-agui = { path = "../crates/agui" }
bo-llm = { path = "../crates/llm" }
bo-documents = { path = "../crates/documents" }
bo-integrations = { path = "../crates/integrations" }
bo-telemetry = { path = "../crates/telemetry" }
sea-orm.workspace = true
graph-flow.workspace = true
serde_yaml_ng.workspace = true
axum.workspace = true
tokio.workspace = true
serde.workspace = true
serde_json.workspace = true
async-trait.workspace = true
async-stream.workspace = true
futures.workspace = true
schemars.workspace = true
thiserror.workspace = true
anyhow.workspace = true
tracing.workspace = true
uuid.workspace = true
chrono.workspace = true
tera.workspace = true
jsonschema.workspace = true

[dev-dependencies]
loco-rs = { workspace = true, features = ["testing"] }
# crates/llm/Cargo.toml — library crates follow this pattern and never depend on loco-rs
[package]
name = "bo-llm"
version = "0.1.0"
edition.workspace = true
license.workspace = true
[dependencies]
bo-core = { path = "../core" }
rig-core.workspace = true
rig-agent.workspace = true
rig-reqwest.workspace = true
reqwest.workspace = true
async-trait.workspace = true
serde_json.workspace = true
tracing.workspace = true