Decision Workspace
named_constants vs enum-assoc vs table_enum
Side-by-side comparison of Rust crates
39
named_constants
growingv0.2.0
Procedural macro makes enums behave like named constants in languages like C/C++ or C#.
62
enum-assoc
stablev1.3.0
Procedural macro to associate constants with enum variants.
37
table_enum
growingv0.3.0
A convenient rust macro to create enums with associated constant data (note: this is different from normal rust enums which are really tagged unions)
Core Metrics
| named_constants | enum-assoc | table_enum | |
|---|---|---|---|
| Health Score | 39 | 62 | 37 |
| Total Downloads | 5.5K | 1.4M | 8.1K |
| 30d Downloads | 42 | 173.2K | 67 |
| Dependents | 0 | 61 | 0 |
| Releases | 2 | 26 | 5 |
| Last Updated | 1231d ago | 89d ago | 631d ago |
| Age | 5y 5m | 4y 1m | 2y 8m |
Health Breakdown
named_constants
Maintenance
3
Quality
16
Community
3
Popularity
4
Documentation
13
enum-assoc
Maintenance
14
Quality
17
Community
11
Popularity
7
Documentation
13
table_enum
Maintenance
4
Quality
15
Community
3
Popularity
5
Documentation
10
Technical Details
| named_constants | enum-assoc | table_enum | |
|---|---|---|---|
| Version | 0.2.0 | 1.3.0 | 0.3.0 |
| Stable (≥1.0) | ✗ No | ✓ Yes | ✗ No |
| License | MIT | MIT OR Apache-2.0 | MIT |
| Dependencies | 0 | 3 | 1 |
| Crate Size | 7KB | 9KB | 4KB |
| Features | 0 | 0 | 0 |
| Yanked % | 0.0% | 7.7% | 0.0% |
| Edition | 2021 | 2021 | 2021 |
| MSRV | — | — | — |
| Owners | 1 | 1 | 1 |
Links
Quick Verdict
- •enum-assoc leads with a health score of 62/100, but none of the options score above 80.
- •⚠ named_constants, table_enum have not been updated in over a year.
- •named_constants, table_enum are pre-1.0 — API may change.