This repository was archived by the owner on Nov 22, 2026. It is now read-only.
Repository navigation
Releases
Releases · amarbaro/mojo-base64
mojo-base64 v0.1.2
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-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) |
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
d5b3e6cbuild: bump version to 0.1.2ac905a0build: recipe pins mojo-compiler to the build's minor
mojo-base64 v0.1.1
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
outuntouched. - A decode bug with
altcharsis fixed (see Fixed).
Changes
Added
- 1500 seeded random differential rows (4042 goldens, was 2494) and
tools/gen_vectors.py SEED COUNT OUTfor 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.shrequiresMOJO_NIGHTLY; no machine path.
Fixed
b64decode(..., altchars=...): altchars are validated and applied before the leading=check, as in CPython (altchars=b'=_'withvalidate=Trueand 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
outto its own_intocall is unsupported (the reserve may move it).
Upgrade / run
None. Same API; uv sync or clone and compile with -I src.
Commits
f2444a9fix: nightly.sh takes the toolchain from MOJO_NIGHTLY, no machine pathf0a0b81perf: b16 pointer kernels with static hex tables, one pass decode875f25ffix: apply and validate altchars before the leading padding checkefaf4d7test: random alphabet-biased differential rows and altchars/leading-pad vectorscf181a3perf: b64 pointer kernels with static alphabet and decode tables269509fdocs: correct benchmark claims and disclaim performance limits58ee28edocs: record measured performance improvements and memory architectured59c531perf: preallocate exact capacity in b64encode99c412frefactor: implement append kernels directly into caller buffersec1ecb6fix: encode base32 directly from input span with fixed tail bufferc057e01fix: decode base32 in place with inline tail storage85a1f67fix: scan input spans directly without input-sized scratch allocationsc0fb61dfix: ensure Python 3.14 oracle in CI environmentb527d07fix: verify user scope works before invoking systemd-runedebd25test: add strict altchars and malformed repr golden fixturesbffb497test: invoke docs gate in continuous integrationca871bafix: require successful non-empty scenario enumeration in check gate243aa8efix: include full CPython PSF license and notice attribution156b2e2docs: record codec limits and measured benchmark resultsdf6d4abtest: require compiling mutants and both toolchain gatescfc6a80fix: restore CPython codec parity with executable oracle checks8313e9etest: expand5643b3cfeat: mojo-base64 initial