Thank you for considering contributing to Temper! This document provides guidelines and information for contributors.
# Clone the repository
git clone https://github.com/nerdsane/temper.git
cd temper
# Build the project
cargo build --workspace
# Run the test suite
cargo test --workspace- Rust 1.92+ (Edition 2024)
- PostgreSQL for integration tests (or use Turso for local dev)
- Z3 for SMT verification (L0 cascade level)
Temper is a Cargo workspace with 19 crates. See the README for the full architecture overview. Key crates for contributors:
temper-spec— Start here to understand the specification formattemper-verify— The four-level verification cascadetemper-server— HTTP server and entity dispatchtemper-runtime— Actor system and event sourcing
Code in simulation-visible crates (temper-runtime, temper-jit, temper-server) must be deterministic:
- Use
sim_now()instead of wall clock time - Use
sim_uuid()instead of random UUIDs - Use
BTreeMap/BTreeSetinstead ofHashMap/HashSet - No
std::thread::spawn,rayon, or multi-threadedtokio::spawn - No
std::fs,std::net, orstd::env::var— abstract I/O behind traits
- Bounded mailboxes — every actor mailbox has a capacity limit
- Pre-assertions at function entry, post-assertions before return
- Budgets not limits — express constraints as budgets that get consumed
- Fail fast on invariant violations
- No silent failures — every error path is logged or propagated
- Files exceeding 500 lines must be split into directory modules
- All
pubitems must have doc comments genis a reserved keyword in Edition 2024 — never use as a variable name
temper-jitmust not depend ontemper-verifyin[dependencies]- Production binaries must not pull in
staterightorproptest
- Fork the repository and create a feature branch
- Write tests for new functionality
- Ensure all tests pass:
cargo test --workspace - Run clippy:
cargo clippy --workspace - Run formatting:
cargo fmt --check - Submit a pull request with a clear description
Significant changes require an ADR. Create docs/adrs/NNNN-short-title.md following the template at docs/adrs/TEMPLATE.md. Required for:
- New features or architectural changes
- New integrations or multi-crate changes
- New patterns or conventions
Not required for bug fixes, single-file refactors, documentation changes, or test additions.
By contributing, you agree that your contributions will be dual-licensed under the MIT and Apache 2.0 licenses.