rustio rustio.net
60

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 10+ years)
  • Massive adoption (7.0K crates depend on it)
  • Tiny footprint (12KB, 0 deps)
  • Permissive license (MIT OR Apache-2.0)

Security

Checking security advisories...
Downloads
597.9M
Dependents
7.0K
Releases
11
Size
12KB

Deep Insights

📊
Steady growth

41.9M downloads in the last 30 days (1.4M/day), up 18% from the previous period.

🔗
Widely adopted

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

Stable for 10+ years

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.

🪶
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, wasmer-vm, accesskit_windows. When high-quality crates choose scopeguard, it's a strong quality signal.

Health Breakdown

Maintenance 4/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.1M/day avg+58%
0500K1.0M1.5M12/291/162/32/213/113/28

Top Dependents

Version Adoption

v1.2.0
68%
v1.1.0
29%
v0.3.3
2%
v1.0.0
1%
v0.1.2
0%

Release Timeline

11 releases1 yankedsince 2015
J
F
M
A
M
J
J
A
S
O
N
D
2015
2
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.0K
crates depend on scopeguard

Similar Crates