← Back home · Compare
rjest vs @swc/jest
The Rust transformer that keeps Jest, just faster
@swc/jest is the closest conceptual cousin: keep Jest, swap the slow part for Rust. But it only speeds the transform step. Jest still forks workers per invocation and re-pays Node/Jest startup on every run, and the SWC cache is per-run. rjest goes one layer further — same native SWC transforms with a persistent on-disk cache, plus a warm daemon so the whole run loop stops starting from cold.
| Feature | rjest | @swc/jest | Advantage |
|---|---|---|---|
| Layer in the stack | Full test runner (transform + workers + scheduling) | Transformer only (a jest.config transform entry) | Comparable |
| What it speeds up | The whole warm-run loop: transform, worker boot, startup | The TS/JS transform step only | rjest |
| Transform engine | SWC (Rust, native) | SWC (Rust, native) | Comparable |
| Persistent transform cache | blake3-keyed sled cache on disk, reused across runs | Per-run; no persistent cross-run cache | rjest |
| Worker startup | Warm VM-context workers, kept alive by the daemon | Jest forks workers per invocation | rjest |
| Per-run Node/Jest startup | Paid once at daemon boot | Paid on every run (still plain Jest) | rjest |
| Warm-run latency | ~14ms in repo benchmark (10-100× depending on suite) | Faster transforms, but Jest startup each run | rjest |
| Keeps jest.config | Yes — unchanged | Yes — you add one transform entry | Comparable |
| Background process required | Yes (jestd) | No | @swc/jest |
| Adoption | Swap the binary name; keep config | Add @swc/jest to the transform map | Comparable |
| License | MIT | MIT | Comparable |
Pick rjest when
- ▸Your transforms are already fast (or on @swc/jest) but the suite still feels slow because startup and worker boot dominate
- ▸You want the SWC speedup to persist across runs via an on-disk cache, not be recomputed each invocation
- ▸You run the same suite many times a day (TDD, watch, CI hot path) and want warm workers instead of a fresh fork each time
- ▸You want a Jest-identical CLI plus --json / --machine for AI agents and CI parsers
Pick @swc/jest when
- ▸Your only bottleneck is the transform step and per-invocation startup is already negligible
- ▸Your environment forbids long-running background processes and a per-run transformer is all you can adopt
- ▸You want the smallest possible footprint — a single transform entry in jest.config, nothing running in the background
Still deciding?
The cheapest validation is to install rjest alongside @swc/jest in CI and compare a few hundred runs. If a test passes in @swc/jest but not rjest, file an issue — we will treat it as a contract violation.