This repository was archived by the owner on Nov 22, 2026. It is now read-only.
Repository navigation
Releases
Releases · amarbaro/mojo-uuid
mojo-uuid v0.1.2
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-compilerto 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-compilerrun 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
070b5cabuild: bump version to 0.1.2b434c44build: recipe pins mojo-compiler to the build's minor
mojo-uuid v0.1.1
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). UUIDcan be aDictorSetkey 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 andbytes_le()40 -> 5 ns.
Changes
Added
UUIDconforms toComparable,HashableandWritable:Dict[UUID, V],Set[UUID],print(uuid),String(uuid).tools/gen_unicode.pyand the generatedsrc/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)followsUUID(int=int(text)): base-10 grammar, invalid text names the literal.uuid8draws one 16-byte entropy block instead of up to threegetrandomcalls.- Scripts no longer use
systemd-runor sibling paths;scripts/env.shresolves 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_intreported "out of range" for non-digit text and ignored signs, spaces and underscores.- The tracked
src/uuid/hashlibsymlink (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_intdoes 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
6786381fix(ci): run the CPython oracle on Python 3.14 even when the runner has 3.122379000refactor(uuid): uuid8 draws one 16-byte block, build is warning-free08afe88fix(uuid): drop the dangling src/uuid/hashlib symlink7514045docs(uuid): point the v0.1.1 note at the tagged commit6f04c15docs(uuid): v0.1.1 notes, design numbers, API traits and Unicode parsing, rules3d1471fbuild(uuid): scripts drop systemd-run and sibling paths for one env.sh and a plain timeouta8eabf1test(uuid): compare every accessor, name UUIDs, uuid8 and v6/v7 state with CPythone69d76dfix(uuid): make UUID hashable, printable and usable as a Dict or Set key4178fd8perf(uuid): parse and format through SIMD, no allocation on canonical input664dcc3fix(uuid): parse and quote Unicode text like CPython int() and repr()e4fcc41test(bench): add 14 paired operations to the benchmark and its CPython twin