lits 0.2.2

A proc-macro collection that parses human-readable literals at compile time.
Documentation
1
2
3
4
5
6
7
8
use lits::bytes;

// Use `u32` to make sure it's not annotated with `u64` for better flexibility.
const SIZE: u32 = bytes!("1 KiB");

fn main() {
  assert_eq!(SIZE, 1024u32);
}