This file provides context and instructions for AI coding agents working on the ossca-2026-rltk project.
ossca-2026-rltk is a Rust workspace based on the bracket-lib ecosystem. It includes a facade crate (bracket-lib), focused bracket-* crates for rendering/algorithms/utilities, and a compatibility facade (rltk).
The repository is used in the 2026 OSSCA contribution program and emphasizes clear crate boundaries, feature-gated backends, and contributor-friendly documentation.
| Component | Details |
|---|---|
| Language | Rust (edition 2021) |
| Build tool | Cargo |
| Toolchain | stable (plus nightly for cargo udeps in CI) |
ossca-2026-rltk/
├── src/ # bracket-lib facade exports
├── bracket-algorithm-traits/ # shared algorithm abstractions
├── bracket-color/ # color types and transforms
├── bracket-geometry/ # geometry primitives and helpers
├── bracket-noise/ # noise generation utilities
├── bracket-pathfinding/ # pathfinding and FOV implementations
├── bracket-random/ # RNG and dice parsing utilities
├── bracket-terminal/ # runtime loop and rendering backends
├── bracket-rex/ # RexPaint support
├── bracket-embedding/ # embedding/linking helpers
├── bracket-bevy/ # Bevy integration crate
├── rltk/ # backward-compatible facade
├── manual/ # mdBook source
├── .github/workflows/rust.yml # CI pipeline
├── ARCHITECTURE.md # architecture and crate map
└── README.md
- Keep
bracket-libandrltkstable as high-level facades for downstream users. - Keep crate responsibilities focused (runtime in
bracket-terminal, algorithms inbracket-pathfinding, shared traits inbracket-algorithm-traits, etc.). - Prefer feature-gated backend integrations instead of runtime branching for platform/rendering selection.
- Use additive changes to public APIs; avoid leaking implementation-only internals.
- Follow existing crate/module organization before introducing new shared helpers or cross-crate dependencies.
cargo build
cargo check --allcargo test --allcargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings -A clippy::multiple-crate-versionscargo +nightly udeps --all-targets
cargo audit- Conventional Commits:
feat:,fix:,refactor:,perf:,test:,docs:,chore: - Split commits by behavior or another meaningful unit of change.
- Release commits:
feat: vX.Y.Z — short summary - Hotfix:
fix: description(no version in message)
The GitHub Actions workflow (.github/workflows/rust.yml) runs on push/PR to main:
- Check:
cargo check --all - Lint:
cargo fmt --all -- --checkandcargo clippy --workspace --all-targets -- -D warnings -A clippy::multiple-crate-versions - Test:
cargo test --all - Unused Crates:
cargo +nightly udeps --all-targets - Audit: dependency security audit via
actions-rust-lang/audit
All CI jobs must pass before merging a pull request.
- Keep code formatted with
cargo fmtbefore committing. - Fix all
cargo clippywarnings — the CI enforces-D warnings. - Add tests for new functionality in the relevant module; for split domains, prefer colocated
tests.rs. - Keep commits focused and write clear commit messages.
- Open a pull request targeting the
mainbranch.