Decision Workspace
lazy_thread_local vs thread_local vs ref_thread_local
Side-by-side comparison of Rust crates
37
lazy_thread_local
growingv0.1.2
Lazily initialised per-object thread-local storage
64
thread_local
growingv1.1.10
Per-object thread-local storage
49
ref_thread_local
growingv0.1.1
A macro for declaring thread-local `static`s like using both of `lazy_static!` and `RefCell`
Core Metrics
| lazy_thread_local | thread_local | ref_thread_local | |
|---|---|---|---|
| Health Score | 37 | 64 | 49 |
| Total Downloads | 4.9K | 743.2M | 374.1K |
| 30d Downloads | 0 | 0 | 0 |
| Dependents | 0 | 3.6K | 227 |
| Releases | 3 | 29 | 3 |
| Last Updated | 942d ago | 91d ago | 1788d ago |
| Age | 2y 11m | 10y 6m | 8y |
Health Breakdown
lazy_thread_local
Maintenance
5
Quality
9
Community
6
Popularity
4
Documentation
13
thread_local
Maintenance
11
Quality
18
Community
12
Popularity
8
Documentation
15
ref_thread_local
Maintenance
3
Quality
16
Community
12
Popularity
7
Documentation
11
Technical Details
| lazy_thread_local | thread_local | ref_thread_local | |
|---|---|---|---|
| Version | 0.1.2 | 1.1.10 | 0.1.1 |
| Stable (≥1.0) | ✗ No | ✓ Yes | ✗ No |
| License | MIT | MIT OR Apache-2.0 | MIT |
| Dependencies | 3 | 1 | 0 |
| Crate Size | 5KB | 16KB | 8KB |
| Features | 0 | 1 | 0 |
| Yanked % | 33.3% | 6.9% | 0.0% |
| Edition | 2021 | 2021 | — |
| MSRV | — | 1.63 | — |
| Owners | 1 | 1 | 1 |
Links
Quick Verdict
- •thread_local leads with a health score of 64/100, but none of the options score above 80.
- •thread_local is depended on by 3.6K crates — strongest ecosystem trust.
- •⚠ lazy_thread_local, ref_thread_local have not been updated in over a year.
- •lazy_thread_local, ref_thread_local are pre-1.0 — API may change.