Development
The checks
One command runs what CI runs:
make check # or: just checkThat is cargo fmt --check, cargo clippy -D warnings and cargo test, each with and without all features, then go vet and go test -race for the console. CI also runs golangci-lint over cli/. Clippy runs with -D warnings: the workspace is warning-free and stays that way.
cargo test -p phantom-database # one crate
cargo test -p phantom-core state_res # one area
cd cli && go test ./internal/tui/... # the consoleCI
| Workflow | Runs |
|---|---|
rust.yml | fmt, clippy and tests, with --locked |
go.yml | vet, golangci-lint, race tests |
audit.yml | cargo-deny licences and advisories, govulncheck |
website.yml | builds this site and deploys it to GitHub Pages |
Conventions
- No catch-all modules. There is no
utils; a module is named for its subject. - Comment the reasoning, not the mechanics. Change the comment when you change the decision.
- Divergences from conduwuit get a comment where they occur.
- Config documentation lives on the struct field, never in the generated example.
Things that surprise you once
phantom-example.tomlchanges when youcargo buildand the config changed — commit it.cargo checkdoesn't regenerate it.alloc::jeandalloc::hardenedare never both compiled; rust-analyzer shows one as "not included in any crates".