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 3+ years
  • ✓Stable API (1.x for 11+ years)
  • ✓Massive adoption (10.4K crates depend on it)
  • ✓Tiny footprint (12KB, 0 deps)
  • ✓Permissive license (MIT OR Apache-2.0)

Security

Checking security advisories...
Downloads
1.0B
Dependents
10.4K
Releases
11
Size
12KB

Deep Insights

📊
Steady growth

84.9M downloads in the last 30 days (2.8M/day), up 14% from the previous period.

🏛️
Foundational crate

10.4K crates depend on scopeguard — it's part of the Rust ecosystem's core infrastructure. Removing it from your dependency tree would be extremely difficult.

✅
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, encoding_rs, serialport, protox, accesskit_windows. 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
256K/day avg-100%
01.0M2.0M3.0M8/229/99/2710/1511/211/19

Top Dependents

Version Adoption

v1.2.0
79%
v1.1.0
19%
v0.3.3
1%
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
10.4K
crates depend on scopeguard

Similar Crates