Skip to content
Branch: master
Go to file

HTTP mocking for Rust!

Get it on

Documentation available at

Before upgrading, make sure to check out the changelog.

Contribution Guidelines

  1. Check the existing issues and pull requests.
  2. One commit is one feature - consider squashing.
  3. Format code with cargo fmt.
  4. :shipit:



Run tests:

cargo test

...or run tests using a different toolchain:

rustup run --install 1.36.0 cargo test

...or run tests while disabling the default features (e.g. the colors):

cargo test --no-default-features

Code style

Mockito uses rustfmt as a general code style.

Install rustfmt:

rustup component add rustfmt

Format code:

cargo fmt

Some editors might provide a plugin to format your Rust code automatically.


Mockito uses clippy as a linter.

Install clippy:

rustup component add clippy-preview

Run the linter:

# Touch a file to force cargo to rerun clippy on the project
touch src/

cargo clippy --lib --tests --all-features -- -D clippy::pedantic -D clippy::nursery

...or run the linter using a different toolchain:

rustup run --install 1.36.0 cargo clippy --lib --tests --all-features -- -D clippy::pedantic -D clippy::nursery



cargo publish


Install rust nightly:

rustup install nightly

Run benchmarks:

rustup run nightly cargo bench

Logo courtesy to 👌

You can’t perform that action at this time.