This repository was archived by the owner on Nov 22, 2026. It is now read-only.
Repository navigation
mojo-bento v0.1.2
mojo-bento v0.1.2
Released: 2026-11-04 · Commit: e50431c · Previous: v0.1.1
What it does
BentoML's serving core as a Mojo library: an epoll HTTP/1.1 server, typed JSON endpoints whose answers (success and
validation errors) are byte for byte BentoML 1.4.39's, health and Prometheus metrics, sd_notify and a graceful drain,
chunked and SSE streaming, an adaptive request batcher, a BentoML-layout model store, and bento build to package a
service into one directory. Linux x86-64, Mojo 1.2. It imports six libraries by the same author (aio, gguf-core, json,
posix, safetensors, systemd).
Highlights
- One unauthenticated request could crash v0.1.1: a chunk size of 16 hex digits wrapped negative and passed the
413 check. It is now refused like a declared Content-Length pastmax_body. ModelStore.deleteon an item whose weights directory is a symlink deleted the shared weights outside the store.
It now removes the link only.- A list field of 100k elements validates in 21 ms instead of 8665 ms (it was quadratic).
- The six libraries bento used to copy into
src/are now dependencies, each pinned to a commit.
Changes
Added
scripts/deps.sh: fetches the six libraries intolib/, each pinned to a commit;recipe.yaml(conda package
mojo-bento, depending on the sixmojo-*packages);docs/design.md.
Changed
- The server runs on mojo-aio's epoll loop; bento's own TCP/epoll layer is gone (same design: worker threads on one
epoll set,EPOLLONESHOT). - Builds take
-I src -I lib(scripts/mojo.shdoes it). - Builds on Mojo 1.3 nightly (
1.3.0.dev2026110305) as well as 1.2.0.
Fixed
http: a chunk size pastmax_bodyis refused while its digits are read (was: signed overflow, server killed).store:deletenever follows a symlinked directory.server:serve()closes every connection it accepted on return (idle keep-alive clients hung, a secondServer
in one process leaked fds).endpoint: list fields coerce in one pass (Json.items()), O(n) instead of O(n^2).pyproject.tomlversion matches the tag (it said 0.1.0 at v0.1.1).
Removed
src/aio,src/gguf,src/json,src/posix,src/safetensors,src/systemdanddocs/vendored.md
(2234 lines of copies).
Verified
| Check | Result |
|---|---|
scripts/ci.sh on Mojo 1.2.0, lib/ built from git archive of each pinned commit |
PASS (b1-b6, batch-replay, batch-threads, serve_restart, list-field perf, quickstart) |
scripts/deps.sh fetch, GitHub URLs rewritten to the local repos |
PASS (each fetched tree equal to the library's src/) |
mojo precompile src/bento -I lib |
PASS (309 KB .mojoc) |
| One program importing bento, gguf-core, ggufx, safetensors and mojo-log, opening files through each | PASS (links, runs) |
mojo-lib-audit |
PASS |
mojo-upgrade check on Mojo 1.3 nightly 1.3.0.dev2026110305 |
PASS 9/9 |
Known limits
scripts/deps.shneeds the pinned commits on GitHub; a clean-container CI run is UNVERIFIED until they are pushed.- The systemd and sandbox gates (b4systemd, b7) run locally only (
scripts/local-gates.sh); not rerun for this release. - The conda package is not published yet.
Upgrade / run
uv sync
scripts/deps.sh # new: the six libraries into lib/
mojo build -I src -I lib app.mojo -o app # was: -I src
Commits
e50431cbuild: pin gguf-core v0.1.3c5c3551build: pin posix v0.1.3, safetensors v0.1.3, systemd v0.1.2fe6edc5build: conda recipe and docs/design.md15789a5build: import the six sibling libraries instead of vendored copies35ff04cfix: pyproject version 0.1.1, as tagged and in CHANGELOGc856051fix: sync vendored gguf-core (reader allocations, nesting depth cap)c52e13bfix: build on Mojo 1.3 nightly526da94refactor(server): unsafe_offset instead of the deprecated pointer +392cbc5fix(server): serve() closes the connections it acceptedb9c8dcbperf(endpoint): coerce list fields in one pass with Json.items()509643efix: sync vendored gguf-core and safetensors with their bounds fixes9a5dbdadocs: vendored versions match the synced tags (posix 0.1.2, json 0.1.1, systemd 0.1.1)38365e8fix(store): delete removes a symlinked directory as a link, never follows it3b5b9e8fix(http): refuse a chunk size past max_body while its digits are read40b843brefactor: run the server on mojo-aio, delete bento's own epoll/TCP layer5c12791docs: CI, latest-release and license badges