Decision Workspace
thread_local vs lazy_thread_local vs ref_thread_local
Side-by-side comparison of Rust crates
64
thread_local
growingv1.1.10
Per-object thread-local storage
37
lazy_thread_local
growingv0.1.2
Lazily initialised 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
| thread_local | lazy_thread_local | ref_thread_local | |
|---|---|---|---|
| Health Score | 64 | 37 | 49 |
| Total Downloads | 743.2M | 4.9K | 374.1K |
| 30d Downloads | 0 | 0 | 0 |
| Dependents | 3.6K | 0 | 227 |
| Releases | 29 | 3 | 3 |
| Last Updated | 91d ago | 942d ago | 1788d ago |
| Age | 10y 6m | 2y 11m | 8y |
Health Breakdown
thread_local
Maintenance
11
Quality
18
Community
12
Popularity
8
Documentation
15
lazy_thread_local
Maintenance
5
Quality
9
Community
6
Popularity
4
Documentation
13
ref_thread_local
Maintenance
3
Quality
16
Community
12
Popularity
7
Documentation
11
Technical Details
| thread_local | lazy_thread_local | ref_thread_local | |
|---|---|---|---|
| Version | 1.1.10 | 0.1.2 | 0.1.1 |
| Stable (≥1.0) | ✓ Yes | ✗ No | ✗ No |
| License | MIT OR Apache-2.0 | MIT | MIT |
| Dependencies | 1 | 3 | 0 |
| Crate Size | 16KB | 5KB | 8KB |
| Features | 1 | 0 | 0 |
| Yanked % | 6.9% | 33.3% | 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.