19 releases (10 breaking)

Uses new Rust 2024

0.11.2 May 28, 2026
0.10.0 Mar 5, 2026
0.9.0 Dec 11, 2025
0.8.1 Oct 30, 2025
0.1.0 Mar 20, 2024

#824 in Filesystem

Download history 283/week @ 2026-02-14 408/week @ 2026-02-21 685/week @ 2026-02-28 484/week @ 2026-03-07 564/week @ 2026-03-14 456/week @ 2026-03-21 495/week @ 2026-03-28 298/week @ 2026-04-04 570/week @ 2026-04-11 692/week @ 2026-04-18 365/week @ 2026-04-25 327/week @ 2026-05-02 343/week @ 2026-05-09 359/week @ 2026-05-16 530/week @ 2026-05-23 419/week @ 2026-05-30

1,690 downloads per month
Used in 7 crates

MIT/Apache

300KB
6.5K SLoC

Cargo test support.

See https://rust-lang.github.io/cargo/contrib/ for a guide on writing tests.

There are two places you can find API documentation

This crate is maintained by the Cargo team, primarily for use by Cargo and not intended for external use. This crate may make major changes to its APIs or be deprecated without warning.

Example

use cargo_test_support::prelude::*;
use cargo_test_support::str;
use cargo_test_support::project;

#[cargo_test]
fn some_test() {
    let p = project()
        .file("src/main.rs", r#"fn main() { println!("hi!"); }"#)
        .build();

    p.cargo("run --bin foo")
        .with_stderr_data(str![[r#"
[COMPILING] foo [..]
[FINISHED] [..]
[RUNNING] `target/debug/foo`
"#]])
        .with_stdout_data(str![["hi!"]])
        .run();
}

This crate is maintained by the Cargo team, primarily for use by Cargo and not intended for external use. This crate may make major changes to its APIs or be deprecated without warning.

Dependencies

~35–54MB
~1M SLoC