Repository navigation
Releases
mojo-zstd v0.4.0
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]):decompressintoout's memory;outis
empty after an error.decompressis 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.mojotimesdecompress_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 -bdecodes 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
dc12d588docs(zstd): decompress_into and the decoder round in README, api, perf, skill86f0d5edperf(zstd): unconditional first copy of literals and far matchese5ebaeeffeat(zstd): decompress_into reuses the caller's buffer
mojo-zstd v0.3.0
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.shandtests/bench31.mojo: level-3 throughput of five inputs againstzstd -b3 --single-thread.
Changed
- Decoder: overlapping matches, literals and short matches copy 16 bytes per step; the four Huffman streams decode
side by side;decompressreserves 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
decompresson 32 MiB is 6 MB above v0.2.0 (one-step reservation of the declared size). zstd.decompressallocates a new output per call;zstd -breuses 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
7c9aace9docs(zstd): level-3 throughput in README, skill and changelog49bfefc0docs(zstd): level-3 throughput table against libzstde39a62e2perf(zstd): decode the four Huffman streams side by side9c8c94a3perf(zstd): store sequences with 16-byte literal copies and unchecked arrays44222ad9perf(zstd): 16-byte steps for sequence literals and short matchesf675b2a8perf(zstd): split fingerprints through raw pointersc37e06afperf(zstd): raw block without entropy work for match-free flat input; one output reservatione638009dperf(zstd): decode into a buffer sized from the frame content sizef9ac4168test(zstd): level-3 throughput harness against libzstd2d105ba9perf(zstd): 16-byte overlap match copy; skip Huffman on flat literalsfc09c3cadocs(readme): -I paths match the monorepo folders3d7469ffdocs(readme): badges and links point to the monorepo3f7bc623fix: build on Mojo nightly 2026111905 (interior origins)219544a7test(oracle): require system libzstd 1.5.7, fail by name otherwiseff51b7ceRevert "test(oracle): judge corrupted frames with the bundled libzstd 1.5.7"dee03da4test(oracle): judge corrupted frames with the bundled libzstd 1.5.7aa119959test(stream): RSS growth limit +2 MB, above measured runner noisee13974cfchore: ignore lane exchange dird0fc0b92chore: uv.lock carries version 0.2.04af6aaaffix: ZstdReader and ZstdWriter build on Mojo 1.3 nightly5a0b7c09test: malformed-input fuzz for the zstd and lz4 decoders
mojo-struct v0.1.1
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_intounpacks 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
510b5beperf(struct): unpack_from_into and byte_swap word loadscbcdcadfeat(conda): struct recipe 0.1.1; xmojo package name mojo-xmojo
mojo-posix v0.1.7
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.subprocessandposix.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
84b1055refactor(posix): merge systemd into posix.systemd2790fddrefactor(posix): merge subprocess into posix.subprocessef8617cfix(sock): accept a 108-byte unix socket path5ca759ctest(api): bound unread echo in the spawn_pair 3 MB testc6989c2fix(test): socket scenarios bind a relative name inside the scratch dir2174a1cfix(test): poll_timeout polls a pipe, as its oracle does
mojo-imkit v0.11.0
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.bmpsaves one rendered frame and exits: screenshots for docs and sites without a desktop capture.
Changes
Added
IMKIT_BOUNDS=1:Ui.textreports 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=): setsSDL_APP_ID; defaultIMKIT_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>.desktopfile is installed. IMKIT_SHOTcaptures 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
b95dcf3feat(window): Wayland app id and IMKIT_SHOT frame capture4a9560apixi: package section with the pixi-build-mojo backend; shelf.toml298766bci: retry the apt install with a fresh index, then check the tools exista958e1edocs(release): v0.9.0 and v0.10.0 notes name their tags, not a pre-release commitdc37222ci: run the job in ubuntu:26.04; avif_seq parses avifdec with POSIX sed
mojo-libs v0.1.0
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.shfails when it differs from the pyprojects.
Changes
Added
- First release: README table,
tools/gen.mojogenerator,scripts/check.shdrift 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-publicfor the generator.
Upgrade / run
scripts/check.sh # verify
scripts/check.sh --write # refresh README.md
Commits
2f2ad60index: six wave-3 libraries (mmap, semver, glob, prometheus, subprocess, xxhash)13c296bchore(license): fill Apache-2.0 copyright noticef9e31e9feat: index of the Mojo libraries, generated from each pyproject