Architecture
Use this page when you want the public system map before opening the deeper repository-native design docs. Loong is organized as a 13-crate Rust workspace with a strict dependency DAG. This page stays intentionally short: it explains the boundaries builders should preserve, not the full internal authoring trail. These boundaries describe the current public architecture contract, not a claim that every crate split or layer label is frozen forever. If the system evolves, the contract can evolve too, but it should do so explicitly and with review rather than through gradual undocumented drift.Start Here If
What This Page Covers
- the crate DAG and what each crate owns publicly
- the layered execution model and the boundaries it protects
- the usual starting point for common change types
- the common architecture smells that signal a boundary problem
Crate Roles
Layered Execution Model
The crate DAG is only half of the public architecture story. The runtime is also layered so governance and execution stay explicit.Public Principles
- governance-first execution
- additive evolution for public contracts
- small core, rich extension seams
- no internal dependency cycles
What The Boundary Buys You
- Policy stays in the real runtime path instead of becoming documentation-only intent.
- New product surfaces can reuse the same governed execution model instead of inventing sidecar rules.
- Specialization happens through packs, adapters, and integration lanes rather than repeated kernel rewrites.
- Builders can reason about where a change belongs before they touch code.
Where Changes Usually Belong
Non-Negotiable Boundary Rules
- Do not introduce dependency cycles.
- Do not bypass kernel-governed capability, policy, and audit paths with shadow execution routes.
- Prefer additive growth to breaking public contract rewrites.
- Keep runtime-backed product surfaces on the same governed model instead of inventing one-off sidecar systems.
Common Architecture Smells
- a new feature wants to talk around the kernel instead of through it
- a product surface introduces its own private policy or audit logic
- a crate starts absorbing domain behavior that belongs in adapters or packs
- a contribution adds coupling across crates because the boundary feels inconvenient
- a public contract is “simplified” by deleting explicit runtime truth