# Mockall

Rust library that generates mock objects from traits and structs, for controlling the responses of dependencies in unit tests.


Source: https://findsoftware.frbit.cloud/mockall/
Last reviewed: 2026-11-16
Listed since: 2026-11-16

## Record

### Links

- repository: https://github.com/asomers/mockall
- docs: https://docs.rs/mockall

### Identity

- status: active
- maintainer: Alan Somers
- maintainerType: individual
- parent: unknown
- firstRelease: 2019
- hqCountry: unknown

### Kind

- category: testing
- hosting: not applicable
- language: rust
- runtime: binary
- runtimeMin: not applicable
- basedOn: unknown

### Content

- contentStore: not applicable
- databases: not applicable
- adminUi: not applicable
- headlessApi: not applicable
- templating: not applicable
- i18n: not applicable

### Rendering and deploy

- runsAs: unknown
- renderingModes: not applicable
- installMethod: cargo

### License

- licenseModel: open-source
- license: MIT, Apache-2.0

### Releases

- currentMajor: 0
- latestReleaseDate: 2026-06-28

### Adoption

- githubStargazers: 1853
- packagistDownloads: not applicable
- npmWeeklyDownloads: not applicable
- contributors: 36
- pluginCount: unknown
- packagistMonthlyDownloads: unknown
- ecosystemsMonthlyDownloads: unknown
- httpArchiveSites: unknown
- wordpressActiveInstalls: unknown
- dependentRepos: 2538
- dependentPackages: 430

### Sources

- urls: https://api.github.com/repos/asomers/mockall (read 2026-11-16)
- urls: https://github.com/asomers/mockall/blob/master/README.md (read 2026-11-16)
- firstRelease: https://crates.io/api/v1/crates/mockall/versions (read 2026-11-16)
- maintainer: https://github.com/asomers/mockall/blob/master/LICENSE-MIT (read 2026-11-16)
- language: https://api.github.com/repos/asomers/mockall (read 2026-11-16)
- category: https://github.com/asomers/mockall/blob/master/README.md (read 2026-11-16)
- runtime: https://github.com/asomers/mockall/blob/master/README.md (read 2026-11-16)
- installMethod: https://github.com/asomers/mockall/blob/master/README.md (read 2026-11-16)
- license: https://github.com/asomers/mockall/blob/master/README.md (read 2026-11-16)
- license: https://github.com/asomers/mockall/blob/master/README.md (read 2026-11-16)
- licenseModel: https://api.github.com/repos/asomers/mockall (read 2026-11-16)
- currentMajor: https://crates.io/api/v1/crates/mockall (read 2026-11-16)
- latestReleaseDate: https://crates.io/api/v1/crates/mockall/versions (read 2026-11-16)
- githubStargazers: https://api.github.com/repos/asomers/mockall (read 2026-11-16)
- contributors: https://api.github.com/repos/asomers/mockall/contributors?per_page=1 (read 2026-11-16)
- dependentPackages: https://packages.ecosyste.ms/api/v1/registries/crates.io/packages/mockall (read 2026-11-16)
- dependentRepos: https://packages.ecosyste.ms/api/v1/registries/crates.io/packages/mockall (read 2026-11-16)

## Notes

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.

---

Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Attributes are recorded, never scored; absent means unknown.
Credit, in full: FindSoftware, CC BY 4.0
