# 36 Mojo libraries: JSON, GGUF, tokenizers, SQLite, compression and more

**URL:** <https://forum.modular.com/t/36-mojo-libraries-json-gguf-tokenizers-sqlite-compression-and-more/3648>\
**Category:** Community Showcase\
**Created:** [November 9, 2026, 1:15am UTC](https://forum.modular.com/t/36-mojo-libraries-json-gguf-tokenizers-sqlite-compression-and-more/3648 "2026-11-09T01:15:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amarbaro](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@amarbaro](https://forum.modular.com/u/amarbaro)\
**Post date:** [November 9, 2026, 1:15am UTC](https://forum.modular.com/t/36-mojo-libraries-json-gguf-tokenizers-sqlite-compression-and-more/3648/1 "2026-11-09T01:15:21Z")

</div>

I built 36 Mojo libraries and test each one against the reference it imitates, not against itself: mojo-json is byte-identical with Python’s `json`, mojo-gguf writes the same bytes as llama.cpp’s converters and quantizer, mojo-tokenizers returns the same ids as the Hugging Face `tokenizers` crate, mojo-cv checks each op against cv2 5.0, mojo-pyformat rounds exactly like Python’s `format()`.

All 36 are conda packages now:

```auto
pixi workspace channel add https://conda.modular.com/max https://prefix.dev/amarbaro/amarbaro
pixi add mojo-json

```

Each package was installed that way into a fresh workspace, and its quickstart built and ran, before I called it published.

They cover the jobs around a program’s core: JSON, msgpack, gzip/zlib, zstd/lz4, SQLite, safetensors, GGUF, tokenizers, an argparse-style CLI, subprocess, inotify, an epoll loop, logging, Prometheus metrics, sd\_notify, hashing, semver, glob, property tests, a benchmark harness, and an immediate-mode GUI composed on the GPU. Each repo ships its oracle in `tools/`, a negative control that must fail, `docs/api.md`, `docs/design.md`, and an agent skill in `skills/`, so a coding agent can use the library without guessing.

Index with versions and CI badges: [GitHub - amarbaro/mojo-libs: Index of the amarbaro Mojo libraries: each tested against an oracle, with API docs and an agent skill · GitHub](https://github.com/amarbaro/mojo-libs)

Keeping 36 repos green across Mojo releases: every library calls one shared workflow, and a weekly matrix builds all of them on stable and on the current nightly, grouping failures by first compiler error into one issue each. The 2026-11-08 nightly (1.3.0.dev2026110805) broke five libraries: `UnsafePointer` is gone, `ord(String)` now raises, and every binary now loads libLLVM, whose zlib shadows the system one (mojo-gzip segfaulted until it opened libz with `RTLD_DEEPBIND`). All 36 pass on 1.2, and 35 on that nightly (xmojo pins 1.2.0).

Apache-2.0, `mojo>=1.2.0,<1.3` for most.

If one of them saves you work, a star on GitHub is appreciated, and bug reports are welcome.

---

<div class="post-metadata">

**Author:** ![abhisheksreesaila](https://sea1.discourse-cdn.com/flex001/user_avatar/forum.modular.com/abhisheksreesaila/32/600_2.png) [@abhisheksreesaila](https://forum.modular.com/u/abhisheksreesaila)\
**Post date:** [November 9, 2026, 6:01pm UTC](https://forum.modular.com/t/36-mojo-libraries-json-gguf-tokenizers-sqlite-compression-and-more/3648/2 "2026-11-09T18:01:51Z")

</div>

wow! pretty comprehensive. still digesting the list but need a few for my work. Thank for the contribution. any perf benchmarks, Just curious!

---

<div class="post-metadata">

**Author:** ![amarbaro](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@amarbaro](https://forum.modular.com/u/amarbaro)\
**Post date:** [November 10, 2026, 6:07am UTC](https://forum.modular.com/t/36-mojo-libraries-json-gguf-tokenizers-sqlite-compression-and-more/3648/3 "2026-11-10T06:07:17Z")

</div>

Thanks, glad some of them are useful to you! Your question made me do something I had put off: race every library against the thing it imitates, on one machine, one library at a time, with nothing else running. Ryzen 7 7800X3D, Mojo 1.2.0, CPython 3.14, median of 3, and the losses stay in:

 ![bench-1](https://us1.discourse-cdn.com/flex001/uploads/modular/original/2X/c/c2bd57b0bc9760a1b053838b2033dc4ce4be6ea4.png)  
 ![bench-2](https://us1.discourse-cdn.com/flex001/uploads/modular/original/2X/7/7c90181c4333a44b9968b14b3b97eff967087e15.png)  
 ![bench-3](https://us1.discourse-cdn.com/flex001/uploads/modular/original/2X/5/534aa3c1d02d61b8ddca54064f9c93217084fdc3.png)

The red bars are the honest part. hashlib loses to OpenSSL’s SHA-NI path, glob’s per-call fnmatch loses to Python’s regex cache, and opening an amdgpu card or read() into a buffer is slower too. gzip and zstd only tie, because today they call the same libz/libzstd that Python uses. vattn is marked void: its PyTorch reference ran outside the range I had written down before measuring, so I did not quote a ratio. All references ran at their defaults; tokenizers’ batch API is multithreaded and would close most of that gap.

One library moved a lot today: mojo-imkit, the immediate-mode GUI, is at v0.9.0. It now decodes JPEG (baseline and progressive, bit-exact with libjpeg-turbo) and WebP (lossless, lossy, alpha) in pure Mojo, ships 31 themes that all pass a contrast check, and has heading, caption, badge, kv and separator widgets next to the sliders, tables, plots, menus and backdrop blur it already had. A demo frame costs about 21 µs of CPU.

What I am working on next:

- pure-Mojo deflate, zstd and lz4, so gzip, zip and zstd stop depending on system C libraries (deflate byte-identical with zlib)
- an AVIF decoder for imkit, also pure Mojo; the AV1 symbol decoder passed its gate today, partition and intra prediction are next
- the red bars: SHA-NI for hashlib, a pattern cache for glob, faster card open in amdgpu, a better read() path in mmap
- gaps the READMEs admit: gguf converts Qwen2 only, and 12 cv ops are still slower than cv2

Full table, each row pinned to a commit with the raw logs: [mojo-libs/docs/bench.md at main · amarbaro/mojo-libs · GitHub](https://github.com/amarbaro/mojo-libs/blob/main/docs/bench.md)  
Rerun one with `scripts/bench-all.sh mojo-<name>`. If a ratio is more than 20% off on your machine, or you need one of these for your work and something is missing, tell me.
