Decision Workspace
typeswitch vs box_any vs downcast-rs
Side-by-side comparison of Rust crates
41
typeswitch
experimentalv0.1.0
A powerful, Go-inspired macro for clean and declarative runtime type switching on dyn Any trait objects.
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.
63
downcast-rs
growingv2.0.2
Trait object downcasting support using only safe Rust. It supports type parameters, associated types, and type constraints.
Core Metrics
| typeswitch | box_any | downcast-rs | |
|---|---|---|---|
| Health Score | 41 | 39 | 63 |
| Total Downloads | 29 | 2.8K | 133.8M |
| 30d Downloads | 0 | 0 | 5.7M |
| Dependents | 0 | 0 | 4.7K |
| Releases | 1 | 2 | 15 |
| Last Updated | 188d ago | 909d ago | 315d ago |
| Age | 6m | 2y 6m | 10y 7m |
Health Breakdown
typeswitch
Maintenance
5
Quality
15
Community
6
Popularity
2
Documentation
13
box_any
Maintenance
4
Quality
15
Community
3
Popularity
4
Documentation
13
downcast-rs
Maintenance
6
Quality
23
Community
14
Popularity
8
Documentation
12
Technical Details
| typeswitch | box_any | downcast-rs | |
|---|---|---|---|
| Version | 0.1.0 | 0.2.0 | 2.0.2 |
| Stable (≥1.0) | ✗ No | ✗ No | ✓ Yes |
| License | MIT OR Apache-2.0 | MIT | MIT OR Apache-2.0 |
| Dependencies | 0 | 1 | 0 |
| Crate Size | 5KB | 5KB | 13KB |
| Features | 0 | 0 | 3 |
| Yanked % | 0.0% | 0.0% | 0.0% |
| Edition | 2024 | 2021 | 2021 |
| MSRV | — | — | 1.56 |
| Owners | 1 | 1 | 1 |
Links
Quick Verdict
- •downcast-rs leads with a health score of 63/100, but none of the options score above 80.
- •downcast-rs is depended on by 4.7K crates — strongest ecosystem trust.
- •⚠ box_any has not been updated in over a year.
- •typeswitch, box_any are pre-1.0 — API may change.