1 stable release
Uses new Rust 2024
1.0.0 | Mar 28, 2025 |
---|
#2055 in Procedural macros
125 downloads per month
5KB
compile-rand
This crate provides the compile_rand!
macro, which will generate a random number of the given
integer type at compile time.
In other words, if – for whatever reason – you actually need this XKCD comic:
...then this crate will give it to you!
Usage
use compile_rand::compile_rand;
let r = compile_rand!(i64);
println!("{}", r); // A new number each time the program is compiled.
compile-rand
This crate provides the compile_rand!
macro, which will generate a random number of the given
integer type at compile time.
In other words, if – for whatever reason – you actually need this:
...then this crate will give it to you!
Dependencies
~1.5MB
~18K SLoC