Expand description
§id-forge
Typed, high-performance unique ID generation for Rust. Every common ID scheme in one zero-dependency library:
uuid: UUID v4 (random) and v7 (time-ordered)ulid: Universally Unique Lexicographically Sortable IDsnowflake: Twitter Snowflake-style 64-bit IDs (epoch + worker + sequence)nanoid: URL-safe random strings of any length
§Quick example
use id_forge::uuid::Uuid;
let id = Uuid::v4();
println!("{id}");§Why this library exists
Today’s options are fragmented: uuid for UUIDs, ulid for ULIDs,
snowflake-rs for snowflakes, nanoid for NanoIDs. Each has its
own quirks, MSRV, and dependencies. id-forge is one zero-dep
crate at MSRV 1.75 covering every scheme.
§Status
v0.9.1 ships the real ULID implementation: spec-compliant
Crockford base32, 80-bit monotonic factory inside a millisecond,
and a case-insensitive parser. UUID v4/v7 (from 0.9.0) and ULID
now share an inline xoshiro256** random source. Snowflake and
NanoID remain placeholders until 0.9.2 and 0.9.3.