shimforge
github.com/xtsoftwarelabs/shimforge- Category
- Developer Tools
- Rank
- No. 1818Tools index
Previous survey · No. 1724 ·
- Type
- TOOL
- Use case
- Software Testing & Quality
- GitHub
- 10 stars
- Latest release
- v0.1.3
- Date
About
shimforge is a Rust crate for mocking concrete functions, including ones from std and third-party crates like reqwest, without changing production code or introducing traits for testability. Tests use a shimforge Session to intercept a specific function call, set expectations on its arguments and call count, and control its return value, so error-handling paths that would otherwise require touching the filesystem or network can be tested directly.
At a glance
shimforge replaces selected Rust function calls during a test. It is worth a trial if you need to reproduce a disk or clock failure in existing code and adding a dependency interface would touch many callers.
Good fit
Rust developers testing failure paths around existing function calls.
Consider something else when
Skip it if dependency injection already gives you the needed test seam or the code relies on a platform the crate does not support.
Start here
Choose one filesystem error in a small test. Substitute a function that returns the error, confirm the caller handles it, and verify that the original behavior is restored after the session.
Cost and requirements
MIT-licensed. The project lists Rust 1.85 or newer and supports listed macOS, Linux and Windows targets.
Limits to know
A default session applies to its own thread. Global sessions use an exclusive lock and run one at a time, which matters for background workers and test parallelism.
Sources checked 2026-11-05. Source-based assessment.
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.