this post was submitted on 30 May 2025
2 points (75.0% liked)

Zig Programming Language

241 readers
1 users here now

A lemm.ee community for Zig!

founded 2 years ago
MODERATORS
 

From the README:

An RFC 9562 compliant UUID implementation for Zig.

About

  • Version support: Implements all UUID versions including the latest v6, v7, and v8
  • Type safety: Use the Uuid union to accept any version, or Uuid.V7 to only accept V7 UUIDs
  • Thread safety: Generate time-based UUIDs from multiple threads without coordination or duplicate values
  • Packed structs: All UUID types can cast directly to integers and work with raw bytes without overhead
  • Compliant: Generates UUIDs with correct bit layouts, version/variant fields, and timestamp formats
  • Non-compliant: Represent UUIDs that don't follow RFC 9562 for interoperability
  • Flexible clocks: Configurable clock sources for time-based UUIDs with atomic and local implementations
  • Zero dependencies: Uses only Zig's standard library

The design is heavily influenced by the Rust uuid crate, with some Zig specific flavoring.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here