Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ADR 1: Write Vix in Rust

  • Status: Accepted
  • Date: 2026-06-08 (commit a7b9ebaf, “Initial commit: STRIDE — Simple Terminal Rust IDE”)

Context

Vix began as STRIDE, the “Simple Terminal Rust IDE”. The first commit (a7b9ebaf, 2026-06-08) already contains a Rust package: its Cargo.toml names the package stride, edition 2021, rust-version = "1.86", and its README opens “STRIDE is a keyboard-friendly terminal text editor written in Rust”. The first spec in that commit (spec/spec.md, now spec/index/index.md) states the goal as “Create a Simple Terminal Rust Integrated Development Environment. It opens text files, edits them, saves them.” The current spec keeps that sentence and the “Simple Terminal Rust IDE” title.

The language is part of the project’s name from its first commit, so no commit records a choice between Rust and another language. The repository does not record the alternatives considered, nor a written reason for choosing Rust.

Decision

Vix is written in Rust and built with Cargo. Every first-party package is a Rust crate: the App shell (tui/Cargo.toml), the member crates under crates/, the desktop GUIs (gui/Cargo.toml) and the Matrix helper (matrix/Cargo.toml).

Consequences

What the repository shows followed from the choice:

  • The library and binary split was there from day one. The first architecture page (docs/architecture.md in a7b9ebaf) describes “a library crate with a thin binary on top”, so editing logic is tested without a terminal. That rule survives in AGENTS.md (“Keep the logic terminal-independent”).
  • A toolchain policy. The edition moved from 2021 to 2024 on 2026-06-18 (commit 28523815, because the editor code used let-chains). The floor is rust-version in the root Cargo.toml (1.98 today), kept at “current stable minus two” by spec/rust-msrv-n-minus-2/index.md.
  • Quality gates come from the compiler and Clippy. clippy::pedantic, missing_docs = "deny" and unsafe_code = "forbid" are compiler lints (see ADR 3 and spec/rust-clippy-pedantic/index.md).
  • The crate ecosystem shapes the design. The first commit depends on ratatui, crossterm, regex, jiff, serde and ratatui-image (ADR 2); scripting later used Rhai, an embedded language for Rust (crates/vix-script/spec/index.md). The crate table in spec/index/index.md lists each dependency’s Debian package, and Cargo features let one source tree build several products (ADR 5).
  • Distribution through Rust tooling. Releases are built by dist (cargo-dist) and the member crates are published to crates.io (spec/ci/index.md, AI_STATEMENT.md). Publishing many crates is also a cost of ADR 4.

Enforced by