[workspace]
members = ["bin/nanocodex", "bindings/python", "bindings/wasm", "crates/nanocodex", "crates/nanocodex-core", "crates/nanocodex-macros", "crates/nanocodex-mcp", "crates/nanocodex-observability", "crates/nanocodex-service", "crates/nanocodex-tools", "examples"]
default-members = ["bin/nanocodex"]
resolver = "2"

[workspace.package]
version = "0.1.0"
edition = "2024"
rust-version = "1.88"
authors = ["Nanocodex Contributors"]
license = "MIT OR Apache-2.0"
homepage = "https://github.com/gakonst/nanocodex"
repository = "https://github.com/gakonst/nanocodex"
readme = "README.md"
keywords = ["ai", "agents", "openai", "sdk", "websocket"]
categories = ["api-bindings", "asynchronous", "development-tools"]
publish = true

[workspace.dependencies]
arboard = "3"
base64 = "0.22.1"
async-trait = "0.1.89"
bm25 = "2.3.2"
chrono = "0.4.43"
clap = { version = "4.5.54", features = ["derive", "env"] }
crossterm = { version = "0.28.1", features = ["bracketed-paste", "event-stream"] }
criterion = { version = "0.7.0", features = ["async_tokio"] }
dotenvy = "0.15.7"
eyre = "0.6.12"
futures-util = "0.3.31"
getrandom = "0.3.4"
http = "1.3.1"
nanocodex = { version = "0.1.0", path = "crates/nanocodex" }
nanocodex-core = { version = "0.1.0", path = "crates/nanocodex-core" }
nanocodex-macros = { version = "0.1.0", path = "crates/nanocodex-macros" }
nanocodex-mcp = { version = "0.1.0", path = "crates/nanocodex-mcp" }
nanocodex-observability = { version = "0.1.0", path = "crates/nanocodex-observability" }
nanocodex-service = { version = "0.1.0", path = "crates/nanocodex-service" }
nanocodex-tools = { version = "0.1.0", path = "crates/nanocodex-tools" }
image = { version = "0.25.9", default-features = false, features = ["gif", "jpeg", "png", "pnm", "webp"] }
iana-time-zone = "0.1.64"
js-sys = "0.3.82"
nix = { version = "0.30.1", default-features = false, features = ["process", "signal", "user"] }
portable-pty = "0.9.0"
pulldown-cmark = { version = "0.10", default-features = false }
syntect = { version = "5.3.0", default-features = false, features = ["default-syntaxes", "default-themes", "regex-fancy"] }
opentelemetry = { version = "0.31.0", features = ["trace"] }
opentelemetry-otlp = { version = "0.31.0", default-features = false, features = ["http-proto", "reqwest-blocking-client", "reqwest-client", "reqwest-rustls-webpki-roots", "trace"] }
opentelemetry-semantic-conventions = "0.31.0"
opentelemetry_sdk = { version = "0.31.0", features = ["experimental_trace_batch_span_processor_with_async_runtime", "rt-tokio", "trace"] }
pyo3 = "0.29.0"
proc-macro-crate = "3"
proc-macro2 = "1.0.106"
quote = "1.0.46"
ratatui = { version = "0.29.0", features = ["unstable-rendered-line-info"] }
reqwest = { version = "0.12.24", default-features = false, features = ["json", "rustls-tls"] }
rquickjs = "0.12.1"
rmcp = { version = "1.8.0", default-features = false, features = ["client", "reqwest-tls-no-provider", "transport-child-process", "transport-streamable-http-client-reqwest"] }
rustls = { version = "0.23.42", default-features = false, features = ["ring", "std"] }
schemars = "0.8.22"
self-replace = "1.5.0"
semver = "1.0.27"
serde = { version = "1.0.228", features = ["derive", "rc"] }
serde_json = { version = "1.0.149", features = ["raw_value"] }
sha1 = "0.11.0"
sha2 = "0.10.9"
shlex = "2.0.1"
simd-json = "=0.15.1"
smallvec = { version = "1.15.1", features = ["serde"] }
sonic-rs = "0.5.8"
syn = { version = "2.0.119", features = ["full"] }
thiserror = "2.0.17"
tempfile = "3.27.0"
tokio = "1.48.0"
tokio-tungstenite = { version = "0.30.0", default-features = false, features = ["connect", "rustls-tls-native-roots"] }
tower = { version = "0.5.2", features = ["limit", "load-shed", "retry", "timeout", "util"] }
tracing = "0.1.44"
tracing-appender = "0.2.4"
tracing-opentelemetry = "0.32.0"
tracing-subscriber = { version = "0.3.22", features = ["env-filter", "fmt", "json"] }
unicode-segmentation = "1.13"
unicode-width = "0.2"
url = "2.5.7"
uuid = { version = "1", features = ["v7"] }
wasm-bindgen = "0.2.105"
wasm-bindgen-futures = "0.4.55"
web-time = "1.1.0"

[workspace.lints.rust]
unsafe_code = "forbid"

[workspace.lints.clippy]
all = "warn"
pedantic = "warn"

[profile.release]
opt-level = 3
lto = "thin"
debug = "none"
strip = "symbols"
panic = "unwind"
codegen-units = 16

# Release artifacts favor runtime performance over build time, matching Reth's
# maxperf profile without raising the minimum CPU level of portable binaries.
[profile.maxperf]
inherits = "release"
lto = "fat"
codegen-units = 1

# Optimized enough for representative CPU profiles while retaining full symbols.
[profile.profiling]
inherits = "release"
debug = 2
strip = false

[profile.wasm]
inherits = "release"
codegen-units = 1
lto = "fat"
opt-level = "s"
strip = "debuginfo"
