1 unstable release
Uses new Rust 2024
0.1.0 | Mar 30, 2025 |
---|
#9 in #url-safe
30KB
447 lines
timeflake-rs
Rust port of Timeflake, a 128-bit, roughly-ordered, URL-safe UUID.
Original work can be found at anthonynsimon/timeflake.
Usage
[dependencies]
timeflake = "0.1.0"
or
cargo add timeflake
Example
use timeflake::Timeflake;
fn main() {
let mut rng = rand::rng();
let flake = Timeflake::new_random(&mut rng);
println!("{flake}");
}
Features
std
: Allowno_std
environments. This is on by default.uuid
: Allow use ofuuid
crate. This is on by default.
Benchmark
Run benchmarks by follow command. It is recommended to have gnuplot installed.
cargo bench
Dependencies
~1–10MB
~125K SLoC