Development Setup
Prerequisites
| Tool | Version | Why |
|---|---|---|
| Rust | 1.86+ stable | rustup update stable |
| CMake | 3.x+ | BoringSSL compilation |
| Go | 1.19+ | BoringSSL compilation |
| C compiler | gcc, clang, or MSVC | BoringSSL compilation |
| Git | any | Source checkout |
See Installation for platform-specific setup (macOS, Linux, Windows).
Clone and Build
git clone https://github.com/copyleftdev/palimpsest.git
cd palimpsest
cargo build --workspace
First build takes 2-4 minutes (BoringSSL compiles from source). Subsequent builds are incremental.
Running Tests
# Full test suite (288 tests, excludes long-running scale tests)
cargo test --workspace
# Simulation tests only
cargo test -p palimpsest-sim --test simulation_tests
# Scale tests (1K + 5K pages, ~90 seconds)
cargo test -p palimpsest-sim --test scale_test
# Stress test (10K pages)
cargo test -p palimpsest-sim --test stress_test
# Stealth regression tests (requires Chrome + network access)
cargo test -p palimpsest-fetch --test stealth_test -- --ignored --nocapture --test-threads=1
# Single crate
cargo test -p palimpsest-frontier
Pre-Commit Checks
Before submitting a PR:
cargo fmt --check # Formatting
cargo clippy -- -D warnings # Lints (must be warning-free)
cargo test --workspace # All tests pass
IDE Setup
rust-analyzer is recommended for all editors. The workspace Cargo.toml at the project root configures all 15 crates automatically.
| Editor | Setup |
|---|---|
| VS Code | Install rust-analyzer extension |
| JetBrains (CLion/RustRover) | Built-in Rust support |
| Neovim | mason.nvim → install rust-analyzer |
| Emacs | lsp-mode + rustic |
Docker Testing
docker build -t palimpsest .
docker run palimpsest --help
Platform Notes
macOS
BoringSSL builds cleanly with Xcode command line tools + Homebrew CMake + Go. No special flags needed.
Windows (MSVC)
Requires Visual Studio Build Tools with the “Desktop development with C++” workload. CMake and Go must be in PATH. WSL2 is the recommended alternative for a smoother experience.
Linux
All major distributions work. Ensure cmake, go, and clang (or gcc) are installed. See Installation for distro-specific package commands.