ZIO-ULID#
A Scala (and ZIO) implementation of ULID specification
What is ULID?#
ULID stands for "Universally Unique Lexicographically Sortable Identifier". Read more on Official specification or ZIO-ULID documentation
Installation#
libraryDependencies += "com.bilal-fazlani" %% "zio-ulid" % "<VERSION>"
Why ZIO-ULID?#
While there are already a few implementations of ULID in Scala, I could not find one that fits natively in ZIO ecosystem. This library has the core logic from airframe-ulid implemented using FP and ZIO constructs.
Features#
- Pure. No exceptions or any other side effects
- Uses ZIO
Clock
for timestamps - Uses ZIO
Random
for randomness - Uses ZIO
Ref
for thread safety of state - Uses
ZLayer
for dependency injection - Returns
ZIO[ULIDGen, Nothing, ULID]