Skip to content

Releases

mojo-zstd v0.4.0

Choose a tag to compare

@amarbarosys amarbarosys released this 26 Nov 05:04

mojo-zstd v0.4.0

Released: 2026-11-26 · Commit: tag zstd-v0.4.0 · Previous: v0.3.0

What it does

zstd and lz4 frame compression for Mojo, in pure Mojo: one-shot compress/decompress, and
streaming zstd files or buffers through a 128 KiB window. No C library, no foreign calls, no linker flag.

Highlights

  • Faster decoding: 0.72 to 0.82x libzstd's speed at level 3 (v0.3.0: 0.64 to 0.70x); executables +10%, source text
    +11%, JSON +21% on their own.
  • decompress_into(data, out) decodes into a buffer you keep, so a decode loop does not allocate per call.

Changes

Added

  • zstd.decompress_into(data: Span[UInt8, _], mut out: List[UInt8]): decompress into out's memory; out is
    empty after an error. decompress is unchanged for callers.

Changed

  • Sequence execution copies literals 32 bytes and far matches 16 bytes unconditionally before any loop, as libzstd
    does, which saves a mispredicted loop exit on most sequences.
  • tests/bench31.mojo times decompress_into, so both sides of the throughput table reuse their output buffer.

Verified

Check Result
scripts/ci.sh (oracle, golden vectors, mutants, size gate, stream RSS, rebase, API incl. decompress_into reuse and error case, README example) PASS all on monorepo and in a fresh worktree off origin/main
decode-only A/B, best of 3x7 exe 1067 -> 1180, C sources 1544 -> 1725, JSON 1094 -> 1340 MB/s
scripts/bench31.sh, best of two runs, load 7 to 9 decompress 0.73 / 0.72 / 0.79 / 0.79 / 0.82 of libzstd (random, repeated, exe, C sources, JSON)
GitHub CI on main success (run 45755809063)

Known limits

  • zstd -b decodes frames without a checksum; ours verify XXH64 (24 GB/s), which is most of the gap on random and
    repeated input.
  • On sequence-heavy input the match copy waits on literal bytes it just stored; closing that needs libzstd's
    lookahead decode loop.
  • Not covered: dictionaries, multithreading, long-distance matching, the lz4 block format, lz4 levels.

Upgrade / run

pixi upgrade mojo-zstd    # channel https://prefix.dev/amarbaro/amarbaro; decompress is unchanged

Commits

  • dc12d588 docs(zstd): decompress_into and the decoder round in README, api, perf, skill
  • 86f0d5ed perf(zstd): unconditional first copy of literals and far matches
  • e5ebaeef feat(zstd): decompress_into reuses the caller's buffer

mojo-zstd v0.3.0

Choose a tag to compare

@amarbarosys amarbarosys released this 26 Nov 03:56

mojo-zstd v0.3.0

Released: 2026-11-26 · Commit: tag zstd-v0.3.0 · Previous: v0.2.0

What it does

zstd and lz4 frame compression for Mojo, in pure Mojo: one-shot compress/decompress, and
streaming zstd files or buffers through a 128 KiB window. No C library, no foreign calls, no linker flag.

Highlights

  • Much faster at level 3 (issue #31): compress runs at 0.76 to 0.96x libzstd's speed and decompress at 0.64 to 0.70x
    on random, repetitive, binary, source and JSON input. In v0.2.0 the issue measured compress 1.3 to 6.8x and
    decompress 1.6 to 4.6x slower than libzstd.
  • Same output: compressed sizes are byte-count identical to v0.2.0 at every level, and decoding still accepts and
    rejects exactly what libzstd 1.5.7 does.
  • Higher levels got faster too: level 9 49 -> 42 ms and level 19 2750 -> 2601 ms on 4 MiB of text.

Changes

Added

  • scripts/bench31.sh and tests/bench31.mojo: level-3 throughput of five inputs against zstd -b3 --single-thread.

Changed

  • Decoder: overlapping matches, literals and short matches copy 16 bytes per step; the four Huffman streams decode
    side by side; decompress reserves the frame's declared content size in one step (capped at 64 MiB past what is
    decoded, so a lying header stays cheap) instead of growing by doubling.
  • Encoder: flat literals go raw without building a Huffman table (libzstd's heuristic); match-free flat blocks skip
    entropy work; sequences are stored with 16-byte literal copies; block-split fingerprints use raw pointers.

Fixed

  • Builds on Mojo 1.3 nightly (interior origins, ZstdReader / ZstdWriter).

Verified

Check Result
scripts/ci.sh (oracle 2000 cases + golden vectors, 3 planted mutants and 2 FSE mutants rejected, size within 5% of libzstd at every level, stream RSS, rebase, API, README example) PASS all, on the release tree and in a fresh worktree off origin/main
scripts/bench31.sh, 7800X3D, load 6.7 compress 0.89 / 0.96 / 0.76 / 0.81 / 0.78, decompress 0.70 / 0.70 / 0.67 / 0.68 / 0.64 of libzstd (random, repeated, exe, C sources, JSON)
scripts/bench.sh, 32 MiB text, 3 runs zstd c 70-72 ms, d 45-50 ms (v0.2.0: 84-95, 48-73); sizes unchanged
GitHub CI on main after the push success (run 45749869665)

Known limits

  • Decompression is still 0.64 to 0.70x libzstd: the sequence loop, double-symbol Huffman tables and the dfast match
    finder are the open items.
  • Peak RSS of decompress on 32 MiB is 6 MB above v0.2.0 (one-step reservation of the declared size).
  • zstd.decompress allocates a new output per call; zstd -b reuses its buffer, so part of the remaining decode gap
    is allocation and page faults.
  • Not covered: dictionaries, multithreading, long-distance matching, the lz4 block format, lz4 levels.

Upgrade / run

pixi upgrade mojo-zstd    # channel https://prefix.dev/amarbaro/amarbaro; API unchanged

Commits

  • 7c9aace9 docs(zstd): level-3 throughput in README, skill and changelog
  • 49bfefc0 docs(zstd): level-3 throughput table against libzstd
  • e39a62e2 perf(zstd): decode the four Huffman streams side by side
  • 9c8c94a3 perf(zstd): store sequences with 16-byte literal copies and unchecked arrays
  • 44222ad9 perf(zstd): 16-byte steps for sequence literals and short matches
  • f675b2a8 perf(zstd): split fingerprints through raw pointers
  • c37e06af perf(zstd): raw block without entropy work for match-free flat input; one output reservation
  • e638009d perf(zstd): decode into a buffer sized from the frame content size
  • f9ac4168 test(zstd): level-3 throughput harness against libzstd
  • 2d105ba9 perf(zstd): 16-byte overlap match copy; skip Huffman on flat literals
  • fc09c3ca docs(readme): -I paths match the monorepo folders
  • 3d7469ff docs(readme): badges and links point to the monorepo
  • 3f7bc623 fix: build on Mojo nightly 2026111905 (interior origins)
  • 219544a7 test(oracle): require system libzstd 1.5.7, fail by name otherwise
  • ff51b7ce Revert "test(oracle): judge corrupted frames with the bundled libzstd 1.5.7"
  • dee03da4 test(oracle): judge corrupted frames with the bundled libzstd 1.5.7
  • aa119959 test(stream): RSS growth limit +2 MB, above measured runner noise
  • e13974cf chore: ignore lane exchange dir
  • d0fc0b92 chore: uv.lock carries version 0.2.0
  • 4af6aaaf fix: ZstdReader and ZstdWriter build on Mojo 1.3 nightly
  • 5a0b7c09 test: malformed-input fuzz for the zstd and lz4 decoders

mojo-struct v0.1.1

Choose a tag to compare

@amarbarosys amarbarosys released this 26 Nov 03:56

mojo-struct v0.1.1

Released: 2026-11-22 · Commit: tag struct-v0.1.1 · Previous: v0.1.0

What it does

Pack and unpack binary data in Mojo the way CPython 3.14 struct does. Install with pixi add mojo-struct
from the amarbaro/amarbaro prefix.dev channel.

Highlights

  • unpack_from_into unpacks into a list you already own, so a loop over records does not allocate a list per record.
  • This is the first release from the monorepo (amarbaro/mojo-libs, libs/struct).

Changes

Added

  • Struct.unpack_from_into(buf, offset, out).

Changed

  • Byte-swapped fields load a whole word and then swap it, instead of reading byte by byte.

Verified

Check Result
rattler-build build -r libs/struct/recipe.yaml (the recipe test builds the quickstart) PASS, 260.5 KiB .conda

Known limits

  • No speed numbers for this change are published here.

Upgrade / run

pixi add mojo-struct

Commits

  • 510b5be perf(struct): unpack_from_into and byte_swap word loads
  • cbcdcad feat(conda): struct recipe 0.1.1; xmojo package name mojo-xmojo

mojo-posix v0.1.7

Choose a tag to compare

@amarbarosys amarbarosys released this 26 Nov 03:56

mojo-posix v0.1.7

Released: 2026-11-22 · Commit: tag posix-v0.1.7 · Previous: v0.1.6

What it does

Spawn processes, reap them, read signals and sockets from one poll, and talk over unix sockets from Mojo on Linux.
Install with pixi add mojo-posix from the amarbaro/amarbaro prefix.dev channel.

Highlights

  • mojo-subprocess and mojo-systemd are now part of mojo-posix, as posix.subprocess and posix.systemd.
  • A unix socket path of 108 bytes now works, as Linux allows.
  • This is the first release from the monorepo (amarbaro/mojo-libs, libs/posix).

Changes

Added

  • posix.subprocess (was mojo-subprocess).
  • posix.systemd (was mojo-systemd).

Fixed

  • sock: a path of 108 bytes is accepted.

Verified

Check Result
rattler-build build -r libs/posix/recipe.yaml (recipe test) PASS, 187.3 KiB .conda

Known limits

  • mojo-subprocess and mojo-systemd stay on the channel at their last versions.

Upgrade / run

pixi add mojo-posix

Commits

  • 84b1055 refactor(posix): merge systemd into posix.systemd
  • 2790fdd refactor(posix): merge subprocess into posix.subprocess
  • ef8617c fix(sock): accept a 108-byte unix socket path
  • 5ca759c test(api): bound unread echo in the spawn_pair 3 MB test
  • c6989c2 fix(test): socket scenarios bind a relative name inside the scratch dir
  • 2174a1c fix(test): poll_timeout polls a pipe, as its oracle does

mojo-imkit v0.11.0

Choose a tag to compare

@amarbarosys amarbarosys released this 26 Nov 03:56

mojo-imkit-public v0.11.0

Released: 2026-11-16 · Commit: tag v0.11.0 · Previous: v0.10.0

What it does

An immediate-mode GUI for Mojo apps, drawn by one GPU compose kernel over the app frame. System SDL3 presents the window and FreeType builds the glyph atlas.

Highlights

  • Every imkit window now carries a Wayland app id, so KDE and GNOME show the app's own icon instead of a generic one.
  • IMKIT_SHOT=file.bmp saves one rendered frame and exits: screenshots for docs and sites without a desktop capture.

Changes

Added

  • IMKIT_BOUNDS=1: Ui.text reports a string that runs into the current panel border with no clip to stop it (stderr, once per string); the README gallery shots are re-rendered from this tree.
  • Window(..., app_id=): sets SDL_APP_ID; default IMKIT_APP_ID, else the title's first word lowercased.
  • IMKIT_SHOT=FILE (+ IMKIT_SHOT_FRAME, default 30): reads the frame back from the renderer, saves BMP, exits 0.

Verified

Check Result
scripts/local_gate.sh (anim, ui on GPU, window, audio) PASS
window_test with IMKIT_SHOT_FRAME=5 3.7 MB BMP written, exit 0

Known limits

  • The app id only helps when a matching <id>.desktop file is installed.
  • IMKIT_SHOT captures the renderer output at the window's logical size, not the desktop.

Upgrade / run

IMKIT_SHOT=shot.bmp IMKIT_SHOT_FRAME=30 ./your-app
magick shot.bmp shot.png

Commits

  • b95dcf3 feat(window): Wayland app id and IMKIT_SHOT frame capture
  • 4a9560a pixi: package section with the pixi-build-mojo backend; shelf.toml
  • 298766b ci: retry the apt install with a fresh index, then check the tools exist
  • a958e1e docs(release): v0.9.0 and v0.10.0 notes name their tags, not a pre-release commit
  • dc37222 ci: run the job in ubuntu:26.04; avif_seq parses avifdec with POSIX sed

mojo-libs v0.1.0

Choose a tag to compare

@amarbarosys amarbarosys released this 05 Nov 11:04

mojo-libs v0.1.0

Released: 2026-11-05 · Commit: 2f2ad60 · Previous: first release

What it does

Index of the amarbaro Mojo libraries: one table (name, what, version, toolchain, our deps, CI badge)
generated from each library's pyproject.toml. Read it on GitHub; regenerate it with scripts/check.sh --write.

Highlights

  • 33 libraries in one table, each with its version, Mojo pin, in-house dependencies and CI badge.
  • The table cannot drift: scripts/check.sh fails when it differs from the pyprojects.

Changes

Added

  • First release: README table, tools/gen.mojo generator, scripts/check.sh drift gate.

Verified

Check Result
scripts/check.sh PASS index: 33 libraries

Known limits

  • Needs every library checked out next to this repo, and mojo-toml-public for the generator.

Upgrade / run

scripts/check.sh          # verify
scripts/check.sh --write  # refresh README.md

Commits

  • 2f2ad60 index: six wave-3 libraries (mmap, semver, glob, prometheus, subprocess, xxhash)
  • 13c296b chore(license): fill Apache-2.0 copyright notice
  • f9e31e9 feat: index of the Mojo libraries, generated from each pyproject