SLM Rust stack architecture
fix(ai): add dated Correction callouts to 7 of 10 ai/ articles — decode-time constraints, SLM stack deps, sovereign-ai-routing PII claim (compliance-relevant), draft-generate endpoint underclaim, plus 3 minor factual slips; 3 articles verified clean
@@ -15,6 +15,8 @@ cites: [] paired_with: slm-stack-architecture.es.md --- **Correction (2026-08-02):** most of the specific stack described below does not match the real `service-slm` codebase. **Inference**: the real runtime is **llama-server (llama.cpp)** at Tier A and **vLLM** at Tier B — both external, non-Rust binaries called over HTTP (`service-slm/ARCHITECTURE.md:225-233`); `mistral.rs` and `candle` are not deployed anywhere (candle is listed only as a hypothetical future path). **Storage**: the real crate uses `rusqlite`, not `sqlx` (zero `sqlx` hits in `Cargo.lock`). **Document processing / orchestration / observability**: `oxidize-pdf`, `docx-rust`, `calamine`, `pulldown-cmark`, `apalis`, `object_store`, `opentelemetry-rust`, `sigstore-rs`, and `mupdf-rs` — none appear anywhere in the workspace's 286-crate `Cargo.lock`. **Binary/crate layout**: the "Flat binary architecture" section below invents `slm-ledger`, `slm-compute`, `slm-memory-kv`, `slm-memory-adapters`, `slm-inference-local`, `slm-inference-remote`, `slm-api`, `slm-cli` as a single-binary design; the real workspace has five crates (`slm-core`, `slm-doorman`, `slm-doorman-server`, `adapter-hub`, `slm-mcp-server`) with two actual `[[bin]]` targets, not one. What's confirmed accurate: the axum/tower/tokio/reqwest/tracing base, the `cargo-deny`/`deny.toml` license-policy mechanism, and LadybugDB as the knowledge-graph store. **Flagged, not resolved** — this needs a rewrite of the "canonical stack" and "flat binary architecture" sections against the real dependency graph, not a wording fix. [[service-slm|`service-slm`]] is built as a single, statically-linked Rust binary. Every direct dependency in the stack is either pure Rust or Rust bindings to a permissively licensed native library. No copyleft licenses appear anywhere in the dependency graph, which means [[pointsav-overview|PointSav]] holds an unrestricted right to fork, modify, and redistribute the entire codebase. This property is called the "We Own It" criterion. The choice of Rust is not a language preference. It is an engineering constraint imposed by the intended deployment target — [[totebox-os|ToteboxOS]] appliance hardware, where a CPython interpreter plus a large ML framework does not fit in the available memory envelope, and where cold-start predictability and the absence of a garbage collector are operational requirements rather than optional improvements.