Decision Workspace
box_any vs typeswitch vs downcast-rs
Side-by-side comparison of Rust crates
39
box_any
growingv0.2.0
Provides a dynamic box type `BoxAny`, which contains a `Box<T>` value. `BoxAny` is similar to Box<dyn Any> but it doesn't use fat pointer to dynamic dispatch.
44
typeswitch
experimentalv0.1.0
A powerful, Go-inspired macro for clean and declarative runtime type switching on dyn Any trait objects.
65
downcast-rs
growingv2.0.2
Trait object downcasting support using only safe Rust. It supports type parameters, associated types, and type constraints.
Core Metrics
| box_any | typeswitch | downcast-rs | |
|---|---|---|---|
| Health Score | 39 | 44 | 65 |
| Total Downloads | 2.8K | 15 | 102.2M |
| 30d Downloads | 5 | 3 | 7.5M |
| Dependents | 0 | 0 | 4.4K |
| Releases | 2 | 1 | 15 |
| Last Updated | 801d ago | 80d ago | 207d ago |
| Age | 2y 2m | 2m | 10y 3m |
Health Breakdown
box_any
Maintenance
4
Quality
15
Community
3
Popularity
4
Documentation
13
typeswitch
Maintenance
9
Quality
15
Community
6
Popularity
1
Documentation
13
downcast-rs
Maintenance
8
Quality
23
Community
14
Popularity
8
Documentation
12
Technical Details
| box_any | typeswitch | downcast-rs | |
|---|---|---|---|
| Version | 0.2.0 | 0.1.0 | 2.0.2 |
| Stable (≥1.0) | ✗ No | ✗ No | ✓ Yes |
| License | MIT | MIT OR Apache-2.0 | MIT OR Apache-2.0 |
| Dependencies | 1 | 0 | 0 |
| Crate Size | 5KB | 5KB | 13KB |
| Features | 0 | 0 | 3 |
| Yanked % | 0.0% | 0.0% | 0.0% |
| Edition | 2021 | 2024 | 2021 |
| MSRV | — | — | 1.56 |
| Owners | 1 | 1 | 1 |
Links
Quick Verdict
- •downcast-rs leads with a health score of 65/100, but none of the options score above 80.
- •downcast-rs is depended on by 4.4K crates — strongest ecosystem trust.
- •⚠ box_any has not been updated in over a year.
- •box_any, typeswitch are pre-1.0 — API may change.