Mockall
Rust library that generates mock objects from traits and structs, for controlling the responses of dependencies in unit tests.
Mockall is a mock object library for Rust. It generates test doubles for traits and structs, so a unit test can set what a dependency returns in place of the real object. The README says the crate is typically used only by unit tests and shows it added as a development dependency. It is written in stable Rust, and the README says the minimum supported Rust version changes only together with a major or minor version bump.
Identity
- Status
- Active
- Maintainer
- Alan Somers4
- Maintained by
- Individual
- First release
- 20193
Rendering and deploy
- Install with
- cargo2
Releases
Adoption
Sources
- 2026-11-16: links, Written in, License model, GitHub stars
api.github.com/repos/asomers/mockall - 2026-11-16: links, Categories, Runtime, Install with, License
github.com/asomers/mockall/blob/master/README.md - 2026-11-16: First release, Last release
crates.io/api/v1/crates/mockall/versions - 2026-11-16: Maintainer
github.com/asomers/mockall/blob/master/LICENSE-MIT - 2026-11-16: Current major version
crates.io/api/v1/crates/mockall - 2026-11-16: Contributors
api.github.com/repos/asomers/mockall/contributors?per_page=1 - 2026-11-16: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/crates.io/packages/mockall