0001: Rust workspace boundaries
- Status: Proposed (implemented in the MVP)
- Date: 2026-12-05
Context
The IDE needs a reusable engine that is independent of the desktop UI and of any one language, with room for more front ends, language modules and tools. Too many crates add build and API overhead; too few blur ownership.
Decision
Use Rust for the core and the UI. Split the workspace by ownership of state:
ide-text: text, history, coordinates.ide-languages: language registry, syntax, capability contract, LSP lifecycle.ide-extensions: manifests and registry.ide-ai: AI request model and providers.ide-core: the session that composes them (workspace, documents, trust, profiles, themes, decorations, commands).apps/desktop(UI) andtools/perf(benchmarks) as binaries.
Dependencies point downwards only; the core must not depend on the GUI toolkit or the AI crate. unsafe is forbidden in workspace crates.
Alternatives considered
- One crate: simplest, but boundaries would erode and the UI would leak into core logic.
- Crates per future service (search, git, debug, tasks): rejected; empty crates imply features that do not exist.
- Core in Rust, UI in TypeScript/webview: see ADR 0002.
Consequences
- The core is testable and benchmarkable headlessly (
axiom-perfuses the same API as the UI). - New services start as modules inside the crate that owns their state; a new crate needs a new ADR.
- Cross-crate APIs must stay small; breaking them is cheap before 1.0 but should be deliberate.
Validation
ide-core has no egui dependency (cargo tree -p ide-core); integration tests drive the full session without a window.