What ships today
Capability matrix and behavior of the native rusty test runner as implemented.
Status in the matrix is the shipped bar, not marketing. Update this page when behavior lands.
Capability matrix
| Capability | Status | Notes |
|---|---|---|
File tests **/*.test.rs | done | Jest-style co-located |
File tests tests/**/*.rs | done | Integration-style tree |
rusty.json "test" globs/paths | done | Empty array = opt-out |
Unit tests ("unit" / lib+bin #[test]) | done | Opt-in via "test": ["unit", …] |
Doctests ("doctest") | done | Opt-in; lib root via rustdoc --test |
-p / --workspace | done | Multi-package |
--affected [base] | done | Reverse-deps (blast radius) |
--affected-direct [base] | done | Path-touched members only |
| Native workspace graph for affected | done | native members only (no cargo metadata) |
| Parallel compile + run | done | Work-queue workers under one job budget |
| Shared scheduler (one budget) | done | -j / RUSTY_JOBS / CARGO_BUILD_JOBS / CPUs |
| Test binary layer cache | done | CAS-backed unit keys; RUSTY_TEST_CACHE=0 disables |
| JUnit reporter | done | --reporter junit=PATH |
CI sharding (--shard k/n) | done | 1-based unit plan partition |
| Retries | done | --retries N on run failures |
Pipeline
select packages (-p / workspace / affected)
→ parse "test" directives
→ plan units (file, unit, doctest)
→ ensure package build (deps + lib layers)
→ parallel rustc --test / rustdoc --test (CAS cache)
→ parallel run pool
→ package + workspace summary (+ optional JUnit)Selection (shipped)
rusty test # cwd member, or sole package
rusty test -p api -p worker
rusty test --workspace
rusty test --affected # since HEAD~1, + reverse dependents
rusty test --affected origin/main
rusty test --affected-direct main # path touch onlyrusty workspace test-plan [base] prints an equivalent explicit -p list (see Workspace).
Execution flags (shipped)
rusty test --list # plan only
rusty test --no-run # compile only (doctests skipped)
rusty test --fail-fast
rusty test --exact FILTER
rusty test --nocapture # stream test binary stdio
rusty test -j 8 # shared compile + run job budget
rusty test --shard 1/4 # CI partition (1-based k of n)
rusty test --reporter junit=out.xml
rusty test --retries 2 # re-run failed binaries
rusty test --releaseFilters are substring matches on unit names/paths unless --exact.
Concurrency (shipped)
One budget drives both compile and run pools:
| Source | Priority |
|---|---|
RUSTY_JOBS | highest |
-j / --jobs / -jN | next |
CARGO_BUILD_JOBS | fallback |
| host CPU count | default (capped at 32) |
Workers claim units from an atomic work queue. Progress lines look like:
rusty test: package api: 3 unit(s), -j 8
compile [api] src/foo.test.rs ... ok (120ms)
compile [api] src/bar.test.rs ... cache hit (2ms)
rusty test: compile cache 1 hit(s), 1 miss(es)
test [api] src/foo.test.rs ... ok (45ms)Test binary compile cache (shipped)
Each unit is keyed by package identity, source content, crate name, kind, linked package-lib digest (file tests), deps-dir fingerprint, rustc --version, profile, features, and edition. Hits restore the binary (or doctest stamp) from the CAS.
| Control | Effect |
|---|---|
| (default) | cache on |
RUSTY_TEST_CACHE=0 / false / off | skip lookup and store |
Planned unit names
| Kind | Example name |
|---|---|
| File | src/foo.test.rs, tests/http.rs |
| Unit | unit:lib:demo, unit:bin:demo |
| Doctest | doctest:lib:demo |
What is explicitly not shipped
- Silent fallback to
cargo test - macOS / Windows runners
- Full nextest config TOML / archive UX
- Coverage, Miri, sanitizers, fuzzing as first-class
rusty testverbs (see roadmap) - Package-level “green seal” skip of entire test runs
For configuration details see Configuration. For CI recipes see CI.