20个版本 (10个重大更新)

0.11.2 2024年6月11日
0.10.1 2024年3月4日
0.10.0 2023年9月28日
0.9.0 2023年3月21日
0.2.0 2019年10月16日

#373测试 类别中

Download history 18/week @ 2024-04-19 17/week @ 2024-04-26 16/week @ 2024-05-03 17/week @ 2024-05-10 116/week @ 2024-05-17 202/week @ 2024-05-24 188/week @ 2024-05-31 736/week @ 2024-06-07 373/week @ 2024-06-14 340/week @ 2024-06-21 222/week @ 2024-06-28 280/week @ 2024-07-05 228/week @ 2024-07-12 346/week @ 2024-07-19 395/week @ 2024-07-26 357/week @ 2024-08-02

1,389 每月下载量

MIT 许可证

300KB
7K SLoC

C 5.5K SLoC // 0.1% comments Rust 1.5K SLoC // 0.0% comments Shell 82 SLoC // 0.2% comments

cargo-bolero

cargo-bolero 可以通过cargo全局安装

$ cargo install -f cargo-bolero

Linux安装

cargo-bolero 需要安装一些库才能编译。如果这些库不可用,可以通过执行以下命令来放宽要求:cargo install cargo-bolero --no-default-features -f

Debian/Ubuntu

$ sudo apt install binutils-dev libunwind-dev

模糊

Run an engine for a target

USAGE:
    cargo bolero test [FLAGS] [OPTIONS] <test>

FLAGS:
        --all-features           Activate all available features
    -h, --help                   Prints help information
        --no-default-features    Do not activate the `default` feature
        --release                Build artifacts in release mode, with optimizations
    -V, --version                Prints version information

OPTIONS:
        --features <features>                    Space-separated list of features to activate
    -e, --engine <engine>                        Run the test with a specific engine [default: libfuzzer]
    -j, --jobs <jobs>                            Number of parallel jobs
        --manifest-path <manifest-path>          Path to Cargo.toml
    -l, --max-input-length <max-input-length>    Limit the size of inputs to a specific length
    -p, --package <package>                      Package to run tests for
    -r, --runs <runs>                            Run the engine for a specified number of runs
    -s, --sanitizer <sanitizer>...               Build with the sanitizer enabled
    -S, --seed <seed>                            Run the engine with an initial seed
        --target <target>                        Build for the target triple
        --target_dir <target-dir>                Directory for all generated artifacts
    -T, --time <time>                            Run the engine for a specified number of seconds
        --toolchain <toolchain>                  Use a rustup toolchain to execute cargo build

ARGS:
    <test>    Name of the test target

减少

Reduce the corpus of a test target with an engine

USAGE:
    cargo bolero reduce [FLAGS] [OPTIONS] <test>

FLAGS:
        --all-features           Activate all available features
    -h, --help                   Prints help information
        --no-default-features    Do not activate the `default` feature
        --release                Build artifacts in release mode, with optimizations
    -V, --version                Prints version information

OPTIONS:
        --features <features>              Space-separated list of features to activate
    -e, --engine <engine>                  Run the test with a specific engine [default: libfuzzer]
        --manifest-path <manifest-path>    Path to Cargo.toml
    -p, --package <package>                Package to run tests for
    -s, --sanitizer <sanitizer>...         Build with the sanitizer enabled
        --target <target>                  Build for the target triple
        --target_dir <target-dir>          Directory for all generated artifacts
        --toolchain <toolchain>            Use a rustup toolchain to execute cargo build

ARGS:
    <test>    Name of the test target

依赖关系

~5–15MB
~189K SLoC