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

Releases

mojo-base64 v0.1.2

Choose a tag to compare

@amarbarosys amarbarosys released this 08 Nov 23:00

mojo-base64-public v0.1.2

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

What it does

Base16, Base32, Base32hex and Base64 byte codecs for Mojo, matching CPython 3.14.8/3.14.9 base64 bytes and full error messages. Pure Mojo, no Python at run time. Compile from a clone with -I src; see README and docs/api.md.

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) PASS: mojo-base64-0.1.2-hb0f4dca_0.conda

Known limits

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

Upgrade / run

None: no API change.

Commits

  • d5b3e6c build: bump version to 0.1.2
  • ac905a0 build: recipe pins mojo-compiler to the build's minor

mojo-base64 v0.1.1

Choose a tag to compare

@amarbarosys amarbarosys released this 07 Nov 10:49

mojo-base64 v0.1.1

Released: 2026-11-07 · Commit: f2444a9 · Previous: v0.1.0

What it does

Base16, Base32, Base32hex and Base64 byte codecs for Mojo, matching CPython 3.14.8/3.14.9 base64 bytes and full error messages. Pure Mojo, no Python at run time. Compile from a clone with -I src; see README and docs/api.md.

Highlights

  • Base64 and Base16 now run 1.8-5.4x faster than v0.1.0 and faster than CPython at 1 KiB and 64 MiB (b64encode 1.23 vs 0.77 GB/s, b64decode 1.28 vs 0.64, b16decode 1.30 vs 0.47).
  • Codecs allocate only the result: exact capacity, no scratch, no per-call table build; decode errors leave the caller's out untouched.
  • A decode bug with altchars is fixed (see Fixed).

Changes

Added

  • 1500 seeded random differential rows (4042 goldens, was 2494) and tools/gen_vectors.py SEED COUNT OUT for scratch fuzz files.
  • b16 rows in the benchmark and its CPython reference; 7 more mutants (22).

Changed

  • b64 and b16 kernels write through a pointer into reserved capacity; static 64 B/256 B alphabet and decode tables; urlsafe decode and encode use the fast path.
  • scripts/nightly.sh requires MOJO_NIGHTLY; no machine path.

Fixed

  • b64decode(..., altchars=...): altchars are validated and applied before the leading = check, as in CPython (altchars=b'=_' with validate=True and a leading =; bad altchars length with leading =).

Verified

Check Result
MOJO=.venv/bin/mojo scripts/ci.sh PASS 7/7: oracle, 4042 goldens, 10000 brute inputs, 22/22 mutants killed (0 invalid), API, quickstart, docs
differential fuzz vs CPython 3.14.8, seeds 12345/99/2026, 80000 rows 0 mismatches
scripts/nightly.sh (Mojo 1.3.0.dev2026110305) PASS
scripts/bench.sh core 2, 3 alternating rounds, medians table in docs/design.md

Known limits

  • Base32 is append-based and not benchmarked or tuned.
  • Peak RSS of the b64 benchmark is 7.7% above CPython (270144 vs 250828 KB): allocator retention of freed large blocks; the result itself has capacity == length.
  • Python exception types differ; String inputs, encode altchars, Base85 and wrapping are unsupported.
  • Feeding a span of out to its own _into call is unsupported (the reserve may move it).

Upgrade / run

None. Same API; uv sync or clone and compile with -I src.

Commits

  • f2444a9 fix: nightly.sh takes the toolchain from MOJO_NIGHTLY, no machine path
  • f0a0b81 perf: b16 pointer kernels with static hex tables, one pass decode
  • 875f25f fix: apply and validate altchars before the leading padding check
  • efaf4d7 test: random alphabet-biased differential rows and altchars/leading-pad vectors
  • cf181a3 perf: b64 pointer kernels with static alphabet and decode tables
  • 269509f docs: correct benchmark claims and disclaim performance limits
  • 58ee28e docs: record measured performance improvements and memory architecture
  • d59c531 perf: preallocate exact capacity in b64encode
  • 99c412f refactor: implement append kernels directly into caller buffers
  • ec1ecb6 fix: encode base32 directly from input span with fixed tail buffer
  • c057e01 fix: decode base32 in place with inline tail storage
  • 85a1f67 fix: scan input spans directly without input-sized scratch allocations
  • c0fb61d fix: ensure Python 3.14 oracle in CI environment
  • b527d07 fix: verify user scope works before invoking systemd-run
  • edebd25 test: add strict altchars and malformed repr golden fixtures
  • bffb497 test: invoke docs gate in continuous integration
  • ca871ba fix: require successful non-empty scenario enumeration in check gate
  • 243aa8e fix: include full CPython PSF license and notice attribution
  • 156b2e2 docs: record codec limits and measured benchmark results
  • df6d4ab test: require compiling mutants and both toolchain gates
  • cfc6a80 fix: restore CPython codec parity with executable oracle checks
  • 8313e9e test: expand
  • 5643b3c feat: mojo-base64 initial