Development
This chapter covers setting up a development environment and working on litmus.
Prerequisites
- Rust toolchain: defined in
rust-toolchain.toml— stable channel with thewasm32-unknown-unknowntarget - Nix (optional): the
flake.nixprovides a reproducible dev shell with all dependencies - mise: task runner used for all dev commands
Quick start
# Start the web app (Dioxus dev server, port 8883)
mise run dev
# Run the TUI prototype
mise run _cli
# Serve the docs with live reload (port 8882)
mise run _docs-serve
mise tasks
| Task | Description |
|---|---|
dev | Start Dioxus dev server (port 8883) |
build-web | Build web release |
build-cli | Build CLI release |
check | Run cargo check across workspace |
fmt | Format code with cargo fmt |
docs-serve | Serve mdbook with live reload (port 8882) |
docs-build | Build static docs |
bacon-claude-diagnostics | Export compiler diagnostics to .bacon-claude-diagnostics |
Development loop
The recommended workflow uses bacon for continuous compilation feedback:
- Start bacon in a terminal pane:
mise run bacon-claude-diagnostics - Edit code
- bacon watches for changes and writes compiler diagnostics to
.bacon-claude-diagnostics - Read that file to see errors with exact file/line/column locations
- Fix and repeat
For quick one-off checks: mise run check (type-check) or mise run fmt (format).
Project structure
See the Architecture chapter for details on the three crates, data model, scene system, and web app structure.
Work tracking
litmus uses beans, an agentic-first issue tracker. Work is organized into milestones, each containing focused task and feature beans. See Milestones for the full history and Agentic Workflow for how beans fits into the development process.