Skip to content

Releases

1.0.0

Choose a tag to compare

@github-actions github-actions released this 28 Nov 19:39
420eb2a

Dream UUID 1.0.0 Release Notes

Release Date: 2026-11-28

This is the first release of Dream UUID. It makes, reads and prints every kind of UUID in RFC 9562, on Erlang and on JavaScript, and it accepts any 16 bytes as a UUID.

Key Highlights

  • Each 128-bit value is valid: the nil UUID, the max UUID, v6, v8 and the undefined versions go in and come out with the same bits
  • All versions: v1, v3, v4, v5, v6, v7 and v8, and the four namespaces
  • v7 in strict order for all processes of a BEAM node, with no process to start
  • Exact parse errors for the canonical form and the URN form
  • Erlang and JavaScript, with no value above 2^53 in a JavaScript number
  • No dependencies other than gleam_stdlib

What's New

Make and read IDs

Make an ID and read one Tested snippet

import dream_uuid.{type ParseError, type Uuid, from_string, to_string, v7}

/// A new ID for a row, as text. Each new ID sorts after the one before it.
pub fn new_id() -> String {
  v7() |> to_string
}

/// The ID in a request path, or why the text is not a UUID.
pub fn read_id(text: String) -> Result(Uuid, ParseError) {
  from_string(text)
}

The functions

  • from_bit_array, to_bit_array, from_string, to_string, from_urn, to_urn
  • nil, max, is_nil, is_max, version, variant, compare, equal
  • v1, v3, v4, v5, v6, v7, and the builders v1_from, v3_bytes, v4_from, v5_bytes, v6_from, v7_at, v7_from, v8
  • unix_milliseconds, unix_seconds_and_nanoseconds, clock_sequence, node

Testing

  • 283 tests, 0 failed, 100.0% line coverage on the BEAM (315 of 315 lines). The run took 2.95 seconds of wall time, and the runner reports 5.4 seconds of test time. Mode: one gleam test with line coverage on. Machine: Apple M1 Max, 10 cores, 64 GB, macOS 26.5.1, OTP 29, Gleam 1.19.2
  • The tests run on the BEAM only, and line coverage is measured on the BEAM only
  • The tests also run each code block of the README and the guide

Installing

gleam add dream_uuid

Documentation

Community