Literal macros for extprim
.
This crate provides a syntex extension (on stable) so that the extprim
types can be
constructed at compile-time using the i128!()
and u128!()
macros.
Setup
Simply add extprim_literals
to dependencies in Cargo.toml
:
[]
= "2.0"
Use the macros in src/consts.rs
:
#[macro_use] extern crate extprim_literals;
extern crate extprim;
use extprim::u128::u128;
const TEN: u128 = u128!(10);
# fn main() {}