Skip to content
This repository was archived by the owner on Nov 22, 2026. It is now read-only.

Releases

mojo-uuid v0.1.2

Choose a tag to compare

@amarbarosys amarbarosys released this 08 Nov 23:37
e090dad

mojo-uuid-public v0.1.2

Released: 2026-11-08 · Commit: 070b5ca · Previous: v0.1.1

What it does

RFC 9562 UUID values, parsing, formatting, and v3/v4/v5/v6/v7/v8 generation for Mojo with CPython constructor error texts and exact 16-byte inline layout.

Highlights

  • Packaging only: the conda recipe pins mojo-compiler to the minor the package was built with (<1.3.0a0), so it cannot be installed on a Mojo it does not load on.

Changes

Changed

  • recipe.yaml: mojo-compiler run dependency pinned to the build's minor (<1.3.0a0).

Verified

Check Result
pkg-conda dry run on the version commit (H1-H3,H6) NOT RUN: blocked, a dependency is not on a channel yet (H7); recipe-only change

Known limits

  • Packages are built on one Mojo minor only; see the package protocol.

Upgrade / run

None: no API change.

Commits

  • 070b5ca build: bump version to 0.1.2
  • b434c44 build: recipe pins mojo-compiler to the build's minor

mojo-uuid v0.1.1

Choose a tag to compare

@amarbarosys amarbarosys released this 07 Nov 10:49

mojo-uuid v0.1.1

Released: 2026-11-07 · Commit: the one tagged v0.1.1 · Previous: v0.1.0

What it does

RFC 9562 UUID values, parsing, formatting, and v3/v4/v5/v6/v7/v8 generation for Mojo with CPython constructor error texts and exact 16-byte inline layout.

Highlights

  • Parsing a urn:uuid: or {...} UUID takes 10 ns instead of 679 ns; a hyphenated one 9 ns instead of 50 ns (CPython 3.14.9: 777 and 929 ns).
  • UUID can be a Dict or Set key and can be printed: it was not hashable or writable in v0.1.0.
  • Parsing now accepts what CPython's uuid.UUID(hex) accepts: Unicode spaces and Unicode decimal digits around or inside the 32 digits.
  • str() 76 -> 29 ns, hex() 47 -> 27 ns, urn() 105 -> 33 ns, bytes() 32 -> 5 ns and bytes_le() 40 -> 5 ns.

Changes

Added

  • UUID conforms to Comparable, Hashable and Writable: Dict[UUID, V], Set[UUID], print(uuid), String(uuid).
  • tools/gen_unicode.py and the generated src/uuid/_unicode.mojo (Unicode 16 tables).
  • Differential rows against CPython for every accessor, name UUIDs, uuid8, and replayed v6/v7 state.

Changed

  • Parsing and formatting run in place with SIMD and no heap block except the returned String.
  • UUID.from_int(text) follows UUID(int=int(text)): base-10 grammar, invalid text names the literal.
  • uuid8 draws one 16-byte entropy block instead of up to three getrandom calls.
  • Scripts no longer use systemd-run or sibling paths; scripts/env.sh resolves mojo and mojo-hashlib.

Fixed

  • int() whitespace: U+001C..U+001F were stripped (CPython keeps them) and the non-ASCII Unicode spaces were not.
  • Unicode decimal digits were rejected where CPython reads them.
  • Error texts escaped only a few codepoints; they now follow str.isprintable() (\xNN, \uNNNN, \UNNNNNNNN).
  • from_int reported "out of range" for non-digit text and ignored signs, spaces and underscores.
  • The tracked src/uuid/hashlib symlink (dangling in any clone, a second hashlib copy in the package otherwise) is gone.

Verified

Check Result
scripts/ci.sh (stable Mojo 1.2.0) PASS 6/6: RFC replay, constructor texts, 10,000 brute rows, generators, API, CPython differential (6810 rows), fuzz (5000 + edge rows), quickstart, README doc-test
Fuzz vs CPython 3.14.9, before the parse fix 564 of 3842 rows differed; after: 0 of 3842, plus 0 of 3 x 20000 extra-seed rows
Compiling mutants 24/24 killed, 0 invalid
scripts/nightly.sh (Mojo 1.3.0.dev2026110305) PASS (package, every test, tests/api.mojo, quickstart)
scripts/bench.sh, 5 rounds, one core table in docs/design.md

Known limits

  • Linux only (libc getrandom, clock_gettime), little-endian hosts.
  • from_int does not reproduce CPython's 4300-digit decimal limit; UUID1/2 and SafeUUID are not provided.
  • One-shot uuid6()/uuid7() are not monotonic across calls; use the generator types.
  • Unicode tables are Unicode 16 (CPython 3.14); a CPython with other tables can differ on newly assigned codepoints.

Upgrade / run

mojo run -I src -I ../mojo-hashlib/src examples/quickstart.mojo

No API removed. from_int now rejects text that is not a decimal integer (it did before, with another message).

Commits

  • 6786381 fix(ci): run the CPython oracle on Python 3.14 even when the runner has 3.12
  • 2379000 refactor(uuid): uuid8 draws one 16-byte block, build is warning-free
  • 08afe88 fix(uuid): drop the dangling src/uuid/hashlib symlink
  • 7514045 docs(uuid): point the v0.1.1 note at the tagged commit
  • 6f04c15 docs(uuid): v0.1.1 notes, design numbers, API traits and Unicode parsing, rules
  • 3d1471f build(uuid): scripts drop systemd-run and sibling paths for one env.sh and a plain timeout
  • a8eabf1 test(uuid): compare every accessor, name UUIDs, uuid8 and v6/v7 state with CPython
  • e69d76d fix(uuid): make UUID hashable, printable and usable as a Dict or Set key
  • 4178fd8 perf(uuid): parse and format through SIMD, no allocation on canonical input
  • 664dcc3 fix(uuid): parse and quote Unicode text like CPython int() and repr()
  • e4fcc41 test(bench): add 14 paired operations to the benchmark and its CPython twin