Development Setup
Option A: Dev Container
Section titled “Option A: Dev Container”The quickest way to get started is with the included Dev Container, which works in VS Code, JetBrains IDEs, and GitHub Codespaces.
- Install the Dev Containers extension (VS Code) or equivalent
- Open the repository and select Reopen in Container
- The container includes all required tools via Nix
For GitHub Codespaces, simply open the repository on GitHub and click Code > Codespaces > New codespace.
Option B: Local with Nix
Section titled “Option B: Local with Nix”Cursus uses Nix flakes and direnv for a reproducible development environment.
- Install Nix with flakes enabled
- Install direnv and hook it into your shell
- Clone the repository and
cdinto it - Run
direnv allowwhen prompted
The Nix flake supports: x86_64-linux, aarch64-linux, aarch64-darwin.
The dev shell provides: rustc (nightly), cargo, rustfmt, clippy, rust-analyzer, cargo-make, cargo-llvm-cov, zig, and cargo-zigbuild for cross-compilation to Linux and macOS targets. Windows targets require a native Windows host with MSVC and are not buildable from the dev shell.
Build commands
Section titled “Build commands”| Command | Description |
|---|---|
cargo build | Build the project |
cargo run | Run the application |
cargo test | Run tests |
cargo test <name> | Run a specific test |
cargo make coverage | Check test coverage |
cargo clippy | Lint the code |
cargo fmt | Format the code |
JavaScript/TypeScript
Section titled “JavaScript/TypeScript”packages/npm (the @zantarix/cursus npm wrapper) and docs/site (this documentation site) are independent npm projects — there is no workspace root. Install their dependencies separately:
cd packages/npm && npm install # npm wrapper (sigstore verifier, download script)cd docs/site && npm install # documentation site (Astro/Starlight)The Nix dev shell provides Node.js, so no separate Node installation step is needed under Option B.
Code style
Section titled “Code style”- Rust 2024 edition
- Prefer functional style over imperative
- Format code before every commit
- No panicking in production code — avoid
unwrap(),expect(),panic!(), andunreachable!()outside of tests. Useanyhow::Result,.context(), orbail!()to propagate errors.
Testing
Section titled “Testing”- Integration tests live in
tests/and must use--no-interactiveto prevent the TUI from running - Coverage thresholds: 90% for lines/regions/functions, 80% for branches
- Run
cargo make coverageto check coverage locally
Architecture decisions
Section titled “Architecture decisions”Significant design decisions are documented as Architecture Decision Records (ADRs) in docs/adr/. Consult the ADR index for an overview of all decisions and their statuses.