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

mojo-uregex v0.3.1

Choose a tag to compare

@amarbarosys amarbarosys released this 29 Oct 21:10
· 29 commits to main since this release

mojo-uregex v0.3.1

Released: 2026-10-29 · Commit: 3222bf2 · Previous: v0.3.0

What it does

Unicode-aware regular expressions for Mojo, built for the pre-tokenizers of LLM
tokenizers (GPT-2, Llama 3, Qwen, DeepSeek, gpt-oss, Spark-X2.5) and checked
against Python's regex by differential testing. Pure Mojo, CPU. Build with
-I src; requires Mojo 1.2.

Highlights

  • Builds and runs on the stable Mojo 1.2.0 release.

Changes

Changed

  • The pin moves to Mojo 1.2.0 (pyproject.toml); README says Mojo 1.2.

Fixed

  • The library did not build on Mojo 1.2.0: String(StringSlice(unsafe_from_utf8=...)) sends the compiler into a recursion. It now uses String(unsafe_from_utf8=...), which builds on 1.1 and 1.2.

Verified

Check Result
README setup in an empty directory (mojo==1.2.0), then tools/gate.sh PASS, 14/14 tests, every differential run

Known limits

Upgrade / run

python3 -m venv .venv && ./.venv/bin/pip install 'mojo==1.2.0' 'regex==2026.9.29'

Commits

  • 3222bf2 build: Mojo 1.2.0
  • b4f718c fix: String(unsafe_from_utf8=X) instead of wrapping StringSlice
  • fec09c0 docs: NOTICE names the owner and contact