scopeguard
v1.2.0 GrowingA RAII scope guard that will run a given closure when it goes out of scope, even if the code between panics (assuming unwinding panic). Defines the macros `defer!`, `defer_on_unwind!`, `defer_on_success!` as shorthands for guards with one of the implemented strategies.
Quick Verdict
- ✕Not updated for 2+ years
- ✓Stable API (1.x for 10+ years)
- ✓Massive adoption (7.0K crates depend on it)
- ✓Tiny footprint (12KB, 0 deps)
- ✓Permissive license (MIT OR Apache-2.0)
Security
Deep Insights
41.9M downloads in the last 30 days (1.4M/day), up 18% from the previous period.
7.0K crates depend on scopeguard. Strong ecosystem adoption means battle-tested code and long-term stability.
The API has been stable (1.x) for over 10 years with 11 releases. This level of maturity means you can depend on it without worrying about breaking changes.
scopeguard has no external dependencies — minimal supply chain risk and fast compile times.
At 11KB, scopeguard is lightweight. Small crate size correlates with focused, well-scoped functionality.
Notable dependents include lock_api, serialport, protox, wasmer-vm, accesskit_windows. When high-quality crates choose scopeguard, it's a strong quality signal.
Health Breakdown
Recency, release consistency, active ratio
Yanked ratio, deps, size, maturity, features
Reverse deps, ownership, ecosystem
Downloads, momentum, growth trend
Docs, repo, license, metadata
Download Trend
Top Dependents
Most downloaded crates that depend on scopeguard
Version Adoption
Release Timeline
Feature Flags
default =["use_std"]