20 releases (10 breaking)

0.11.2 Jun 11, 2024
0.10.1 Mar 4, 2024
0.10.0 Sep 28, 2023
0.9.0 Mar 21, 2023
0.2.0 Oct 16, 2019

#344 in Testing

Download history 284/week @ 2024-07-09 302/week @ 2024-07-16 361/week @ 2024-07-23 349/week @ 2024-07-30 303/week @ 2024-08-06 387/week @ 2024-08-13 564/week @ 2024-08-20 657/week @ 2024-08-27 673/week @ 2024-09-03 609/week @ 2024-09-10 538/week @ 2024-09-17 352/week @ 2024-09-24 353/week @ 2024-10-01 263/week @ 2024-10-08 280/week @ 2024-10-15 350/week @ 2024-10-22

1,391 downloads per month

MIT license

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 can be installed globally with cargo:

$ cargo install -f cargo-bolero

Linux Installation

cargo-bolero needs a couple of libraries installed to compile. If these libraries aren't available the requirement can be relaxed by executing cargo install cargo-bolero --no-default-features -f

Debian/Ubuntu

$ sudo apt install binutils-dev libunwind-dev

fuzz

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

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

Dependencies

~6–16MB
~212K SLoC