Decision Workspace
map-to-const vs const-gen vs const-gen-derive
Side-by-side comparison of Rust crates
40
map-to-const
growingv0.2.0
Easily convert HashMap<K, V> to constant [(K, V); N] values.
65
const-gen
stablev1.6.9
A crate for generating (relatively) complex compile-time constants in rust.
60
const-gen-derive
stablev1.1.7
A derive macro for the const-gen crate.
Core Metrics
| map-to-const | const-gen | const-gen-derive | |
|---|---|---|---|
| Health Score | 40 | 65 | 60 |
| Total Downloads | 2.9K | 381.8K | 343.1K |
| 30d Downloads | 0 | 32.7K | 32.6K |
| Dependents | 0 | 36 | 45 |
| Releases | 2 | 45 | 16 |
| Last Updated | 1528d ago | 96d ago | 96d ago |
| Age | 4y 2m | 5y | 5y |
Health Breakdown
map-to-const
Maintenance
3
Quality
14
Community
6
Popularity
4
Documentation
13
const-gen
Maintenance
14
Quality
22
Community
10
Popularity
7
Documentation
12
const-gen-derive
Maintenance
13
Quality
17
Community
11
Popularity
7
Documentation
12
Technical Details
| map-to-const | const-gen | const-gen-derive | |
|---|---|---|---|
| Version | 0.2.0 | 1.6.9 | 1.1.7 |
| Stable (≥1.0) | ✗ No | ✓ Yes | ✓ Yes |
| License | MIT | MIT OR Apache-2.0 | MIT OR Apache-2.0 |
| Dependencies | 4 | 2 | 3 |
| Crate Size | 13KB | 11KB | 4KB |
| Features | 0 | 5 | 0 |
| Yanked % | 0.0% | 2.2% | 6.3% |
| Edition | 2021 | 2018 | 2018 |
| MSRV | — | — | — |
| Owners | 1 | 1 | 1 |
Links
Quick Verdict
- •const-gen leads with a health score of 65/100, but none of the options score above 80.
- •⚠ map-to-const has not been updated in over a year.
- •map-to-const is pre-1.0 — API may change.