Skip to content
This repository was archived by the owner on Nov 22, 2026. It is now read-only.

mojo-aio v0.1.1

Latest

Choose a tag to compare

@amarbarosys amarbarosys released this 08 Nov 23:10
· 11 commits to main since this release

mojo-aio v0.1.1

Released: 2026-11-08 · Commit: 1a0ca41 · Previous: v0.1.0

What it does

epoll event loop for Mojo: readiness events, one-shot timers, non-blocking TCP. Callback-free:
wait() fills a list you own with (token, events) and you dispatch, so there is no closure
storage and no allocation per event. 163 lines of code, libc only, Linux.

Same server CPU per request as uvloop, a third of Python asyncio's, half the memory of either
(echo ping-pong, docs/perf.md).

import aio


def main() raises:
    var lfd = aio.tcp_listen(0)  # 127.0.0.1, a free port
    var loop = aio.Loop()
    loop.add(lfd, aio.IN, 1)
    loop.after(10, 2)  # one TIMER event in 10 ms
    var evs = List[aio.Event]()
    while True:
        _ = loop.wait(evs)
        for ev in evs:
            if ev.events & aio.TIMER:
                print("timer", ev.token, "fired; port", aio.local_port(lfd) > 0)
                aio.close(lfd)
                return

Highlights

  • Packaging only: the gate no longer flakes on the quickstart check, and the conda recipe pins the Mojo minor.

Changes

Changed

  • recipe.yaml: mojo-compiler run dependency pinned to the build's minor (<1.3.0a0).

Fixed

  • scripts/check.sh: the quickstart check captured output instead of run | grep -q under pipefail (SIGPIPE flake; mojo-lib-audit pipe-grepq).

Verified

Check Result
scripts/check.sh on Mojo 1.2.0 (timers, 10k connections, fd leak, negative control, doc check) PASS all
mojo-lib-audit before the fix FAIL pipe-grepq:scripts/check.sh

Known limits

Upgrade / run

None: no API change.

Commits

  • build: recipe pins mojo-compiler to the build's minor
  • 1a0ca41 fix: quickstart check captures output instead of piping into grep -q
  • e5b23c9 docs: CHANGELOG names no home path
  • 63c6020 chore(license): fill Apache-2.0 copyright notice