FindSoftware

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

Current major version
Pre-1.05
Last release
2026-06-283

Adoption

GitHub stars
1,8531
Contributors
366
Dependent repositories
2,5387
Dependent packages
4307

Why these figures do not compare

Sources

  1. 2026-11-16: links, Written in, License model, GitHub stars
    api.github.com/repos/asomers/mockall
  2. 2026-11-16: links, Categories, Runtime, Install with, License
    github.com/asomers/mockall/blob/master/README.md
  3. 2026-11-16: First release, Last release
    crates.io/api/v1/crates/mockall/versions
  4. 2026-11-16: Maintainer
    github.com/asomers/mockall/blob/master/LICENSE-MIT
  5. 2026-11-16: Current major version
    crates.io/api/v1/crates/mockall
  6. 2026-11-16: Contributors
    api.github.com/repos/asomers/mockall/contributors?per_page=1
  7. 2026-11-16: Dependent packages, Dependent repositories
    packages.ecosyste.ms/api/v1/registries/crates.io/packages/mockall

Last reviewed · Listed since Edit on GitHubThis page as markdownas JSON