Decision Workspace
const-gen vs const-gen-derive vs map-to-const
Side-by-side comparison of Rust crates
63
const-gen
stablev1.6.9
A crate for generating (relatively) complex compile-time constants in rust.
58
const-gen-derive
growingv1.1.7
A derive macro for the const-gen crate.
40
map-to-const
growingv0.2.0
Easily convert HashMap<K, V> to constant [(K, V); N] values.
Core Metrics
| const-gen | const-gen-derive | map-to-const | |
|---|---|---|---|
| Health Score | 63 | 58 | 40 |
| Total Downloads | 439.9K | 400.9K | 2.9K |
| 30d Downloads | 21.8K | 21.7K | 0 |
| Dependents | 36 | 45 | 0 |
| Releases | 45 | 16 | 2 |
| Last Updated | 145d ago | 145d ago | 1577d ago |
| Age | 5y 2m | 5y 2m | 4y 3m |
Health Breakdown
const-gen
Maintenance
12
Quality
22
Community
10
Popularity
7
Documentation
12
const-gen-derive
Maintenance
11
Quality
17
Community
11
Popularity
7
Documentation
12
map-to-const
Maintenance
3
Quality
14
Community
6
Popularity
4
Documentation
13
Technical Details
| const-gen | const-gen-derive | map-to-const | |
|---|---|---|---|
| Version | 1.6.9 | 1.1.7 | 0.2.0 |
| Stable (≥1.0) | ✓ Yes | ✓ Yes | ✗ No |
| License | MIT OR Apache-2.0 | MIT OR Apache-2.0 | MIT |
| Dependencies | 2 | 3 | 4 |
| Crate Size | 11KB | 4KB | 13KB |
| Features | 5 | 0 | 0 |
| Yanked % | 2.2% | 6.3% | 0.0% |
| Edition | 2018 | 2018 | 2021 |
| MSRV | — | — | — |
| Owners | 1 | 1 | 1 |
Links
Quick Verdict
- •const-gen leads with a health score of 63/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.