#mtg #magic #no-std

no-std mtg_color

Storage optimized color information for Magic the Gathering

3 stable releases

1.1.0 Aug 29, 2022
1.0.1 Aug 28, 2022

#167 in Games

MIT license

190 lines


Do you absolutely need to be able to represent the colors of Magic the Gathering cards (or other game objects) in a single byte? Are ergonmics irrelevant and storage space non-negotiable?


  • no-std compatible
  • only 14 shared bytes needed for all canonical symbol information (compared to 80 bytes for a naive implementation)
  • already at a stable 1.0.0 release
  • zero dependencies
  • coded in pure Rust for speed and safety

No runtime deps