Faster Rust Testing at Scale: cargo-nextest in Practice
Disclaimer: This article was created using AI-based writing and communication companions. With its help, the core topics of this rich and nuanced livestream were distilled into a compact blog post format.
In our recent JetBrains livestream, Vitaly Bragilevsky was joined by Rain, the creator of cargo-nextest, for a conversation about Rust testing, developer tools, open source maintenance, and the everyday developer experience around large Rust projects.
cargo-nextest is widely used across the Rust ecosystem as a next-generation test runner. It is built to make Rust test execution faster, more observable, and more reliable, especially for larger codebases, CI pipelines, and projects with complex integration tests.
The conversation also came at a good time for RustRover users. RustRover 2026.1 introduced native cargo-nextest support, so developers can now run and monitor nextest sessions directly from the IDE, with progress reporting and structured results in the Test tool window.
If you missed the livestream, you can watch the full recording on JetBrains TV. Below, you’ll find a structured recap of the key questions and insights from the session.
Q1. Who is Rain, and how did they get into Rust?
Rain is a software engineer with more than a decade of industry experience. Their Rust journey started professionally in 2017 while working on source control infrastructure at Meta. Rain joined a project to build a Mercurial server in Rust. The team already had someone with Rust expertise, while Rain brought deep knowledge of Mercurial. That collaboration became their entry point into Rust.
“I learned Rust to kind of work on this thing. As I was developing it, I fell in love with Rust and decided to go deeper into it.”
They have worked at Mozilla, Meta, and now Oxide Computer Company, where Rust is used throughout the stack, from embedded firmware to higher-level control plane software.
Q2. What is cargo-nextest?
At a high level, it is designed to run Rust tests faster and give developers better insight into what happened during a test run. In benchmarks,cargo-nextest can be up to three times faster than cargo test, depending on the project and workload.
cargo-nextest also includes features that become important as projects grow. That combination is what makes cargo-nextest useful across both open source and large industry codebases.
“There is a lot of CI focus in cargo-nextest, but there is also a lot of attention paid to the local interactive developer experience.”
Q3. What problem does cargo-nextest solve?
Rain was clear that cargo test is still a good tool, especially for testing core algorithms, data structures, and smaller projects. The limitations become more visible when a Rust project grows into a large service, large CLI application, or codebase with many integration and end-to-end tests.
In those cases, the main problems are not only “how fast can I run tests?” but also:
- Which tests are slow?
- Which tests are flaky?
- What happened in CI?
cargo-nextest is built for that kind of environment.
“The biggest problem that nextest solves is speed and observability of large test suites for large network services.”
Q4. When should someone switch from cargo test to cargo-nextest?
If you are happy with cargo test, you do not have to switch. But if you are unhappy with some part of the testing experience, cargo-nextest is worth trying.
They pointed to three common signals.
- Flaky tests. cargo-nextest can retry tests, which helps distinguish between a consistent failure and a flaky one.
- Test isolation. cargo-nextest runs every test in its own process. This matters for tests that rely on global state, external APIs, graphics contexts, or other resources that may not behave well when reused across tests.
- Speed. For large services and bigger test suites, cargo-nextest is often several times faster than cargo test. That can save both local developer time and CI compute.
“If you are unhappy with cargo test speed, I would highly recommend giving cargo-nextest a shot.”
Q5. What is the coolest cargo-nextest feature?
With run recording, cargo-nextest can capture what happened during a test run, including in CI. Developers can then fetch that run locally, inspect what each test did, and better understand failures that happened outside their machine.
Second one is Perfetto trace output. cargo-nextest can generate trace data that can be opened in Perfetto, giving developers a graphical view of test execution.
“You can get all this observability around test execution, which I think is very powerful.”
Q6. What lesser-known feature should more people know about?
When developers debug tests with cargo test, they often end up running the test binary directly. The problem is that Cargo normally sets up environment variables and configuration around test execution.
cargo-nextest’s debugger support helps solve that by configuring the environment so the test runs in the debugger in a way that is equivalent to normal execution.
“You get the exact same environment in the debugger.”
For developers who need to step through a single failing test, that can make the difference between chasing a misleading local reproduction and actually debugging the real failure.
Q7. How does cargo-nextest help with stuck or long-running tests?
cargo-nextest lets you dump information about currently running tests. On any operating system, you can press T; on macOS, you can also use Control-T via SIGINFO. This gives you a live view of how long tests have been running, along with stdout and stderr output.
That is especially helpful for debugging complex failures that only appear in the context of a larger run.
Q8. What was the hardest part of building cargo-nextest?
A test runner has to do much more than start a process and wait for a result. It has to observe what happens, handle success, failure, abnormal termination, timeouts, retries, output capture, scheduling, and more. As new features are added, that state machine becomes more complex.
Interestingly, cargo-nextest is not a classic “10 million requests per second” async use case. It usually runs only as many tests as there are CPU cores or threads. But the state machine itself is complex, and async Rust gives a structured way to manage that complexity.
“The state machine for managing a test is extremely complex, and being able to express that in async Rust has been very powerful.”
Q9. What would Rain change about Rust if they could go back to 2017?
Async Rust is powerful, but it also introduces footguns that are not present in the same way in synchronous Rust. Rust’s safety model is one of the reasons they were attracted to the language, especially around thread safety, aliasing, and mutability. Async Rust keeps many of those strengths, but cancellation and cleanup can be difficult to reason about.
“I am hopeful, but certainly it is harder to do it now than it was to do it in 2017.”
Q10. Is cargo-nextest extensible?
Yes, and this is one of the reasons it has been able to integrate with other tools.
cargo-nextest provides machine-readable output formats and extension points that other tools can build on. It also supports features like setup scripts, which can prepare a database, seed test data, or configure an environment before tests run.
Q11. Can cargo-nextest be useful for embedded Rust?
Cargo-nextest itself probably will not run on embedded hardware because it is fairly complex. But it can still help with embedded testing workflows where tests are dispatched to real hardware.
One relevant feature is wrapper scripts. Instead of executing a test directly, cargo-nextest can run a script around it. That script can set up the environment, send commands to the hardware, or coordinate with a target runner.
Q12. What makes a great developer tool?
For Rain, a great developer tool has to be correct and reliable, especially when things go wrong.
For a test runner, that means handling more than the happy path. Tests can fail, time out, crash, segfault, produce output, or behave differently depending on the environment. A good tool needs to represent all of that clearly.
“The overall goal is not to automate as much as possible. The overall goal is to serve your customers.”
That is a useful principle far beyond test runners. A great developer tool does not try to remove the developer from the work. It helps them do the work with more confidence.
Q13. Which Rust tools does Rain recommend?
Rain mentioned three:
- cargo-hack: Useful for crates with many feature combinations. It can run tests across feature sets and optimize combinations based on dependencies between features.
- cargo-expand: Useful when developing macros or procedural macros because it shows the expanded output.
- cargo-semver-checks: Useful for crate maintainers because it detects semver compatibility issues, including simple API changes and more subtle changes such as accidentally removing Send or Sync bounds.
Good Rust tooling helps developers understand what their code is doing, what changed, and what might break.
cargo-nextest in RustRover
RustRover 2026.1 adds native support for cargo-nextest directly in the IDE. For Rust developers, this means you can run and monitor nextest sessions without leaving your normal development workflow.
Instead of switching to the terminal and reading raw output, you get structured test results and progress reporting in the Test tool window.
The goal is not to replace the terminal for developers who prefer it. The goal is to reduce friction for teams and developers who already rely on cargo-nextest and want the same workflow integrated into the IDE.
Closing thoughts
As Rust projects grow, testing becomes part of how teams understand correctness, performance, and confidence.
cargo-nextest helps make test runs faster, more isolated, more observable, and easier to debug.
If you’re interested:
- Explore cargo-nextest
- Try cargo-nextest support in RustRover 2026.1
- Watch the full livestream with Rain
If you’re working with slow test runs, flaky tests, or complex CI failures, cargo-nextest is worth exploring.
