rustio rustio.net
59

scopeguard

v1.2.0 Growing

A 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.

MIT OR Apache-2.0
Rust patternsNo standard library #scope-guard#defer#panic#unwind

Quick Verdict

  • Not updated for 2+ years
  • Stable API (1.x for 11+ years)
  • Massive adoption (7.8K crates depend on it)
  • Tiny footprint (12KB, 0 deps)
  • Permissive license (MIT OR Apache-2.0)

Security

Checking security advisories...
Downloads
697.5M
Dependents
7.8K
Releases
11
Size
12KB

Deep Insights

📈
Strong growth momentum

57.6M downloads in the last 30 days (1.9M/day), up 28% from the previous period.

🔗
Widely adopted

7.8K crates depend on scopeguard. Strong ecosystem adoption means battle-tested code and long-term stability.

Stable for 11+ years

The API has been stable (1.x) for over 11 years with 11 releases. This level of maturity means you can depend on it without worrying about breaking changes.

🪶
Zero dependencies

scopeguard has no external dependencies — minimal supply chain risk and fast compile times.

📐
Compact crate

At 11KB, scopeguard is lightweight. Small crate size correlates with focused, well-scoped functionality.

🌟
Used by top crates

Notable dependents include lock_api, serialport, protox, accesskit_windows, wasmer-vm. When high-quality crates choose scopeguard, it's a strong quality signal.

Health Breakdown

Maintenance 3/25

Recency, release consistency, active ratio

Quality 20/25

Yanked ratio, deps, size, maturity, features

Community 17/20

Reverse deps, ownership, ecosystem

Popularity 8/15

Downloads, momentum, growth trend

Documentation 11/15

Docs, repo, license, metadata

Download Trend

Daily downloads · last 90 days
1.6M/day avg+44%
0500K1.0M1.5M2.0M2.5M2/263/164/34/215/95/26

Top Dependents

Version Adoption

v1.2.0
72%
v1.1.0
26%
v0.3.3
2%
v1.0.0
1%
v0.1.2
0%

Release Timeline

10 releases1 yankedsince 2015
J
F
M
A
M
J
J
A
S
O
N
D
2015
1
2016
4
2017
2
2018
1
2019
2020
1
2021
2022
2023
1
2024
2025
2026
Less
More|
Yanked

Feature Flags

default =["use_std"]

use_std*

README

Loading README...

Maintainers

Dependencies
0
direct dependencies
Dependents
7.8K
crates depend on scopeguard

Similar Crates