ADR 0001: No dependencies
- Status: Accepted, 2026-11-27 (decision D15 of the implementation plan)
- Supersedes: the earlier port plan's five-crate workspace on
rustix,windows-sys,unicode-segmentationandunicode-width
Context
A terminal UI runtime needs raw mode, signals, poll, a pseudo-terminal for tests, grapheme segmentation and display width. The usual Rust stack brings 50 to 80 crates for this (docs/COMPARISON.md). Each crate is code shipped without being written or reviewed here, and an advisory in any of them becomes ours.
Decision
petitcarnets depends on nothing but the standard library. About twenty libc functions are declared in src/sys.rs and its submodules, the only place unsafe is allowed (unsafe_code = "deny" everywhere else). The Unicode tables are generated by committed scripts (scripts/gen-grapheme-table.py, scripts/gen-width-tables.py) from pinned upstream data, and checked against Go's results by fixtures.
Consequences
cargo treeprints one crate; theNo dependenciesCI job holds it.- The FFI is ours to get right on every platform: glibc, musl, macOS and FreeBSD each have a CI job, and Miri and ThreadSanitizer run on the code around it.
- Windows needs its own
sysmodule (planned), not a crate. - Unicode updates are a regeneration and a fixture run, not a version bump.
- Anything that needs a third-party crate (SSH, WebAssembly, async adapters) lives in a separate satellite crate, never in this one.