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

mojo-inotify v0.1.0

Choose a tag to compare

@amarbarosys amarbarosys released this 21 Oct 07:18
· 22 commits to main since this release

mojo-inotify v0.1.0

Released: 2026-10-21 · Commit: eb6f085 · Previous: first release

What it does

Watch files and directories from Mojo with Linux inotify. One preallocated read buffer, events read in place, and a pollable file descriptor for an event loop.

Highlights

  • Draining 200k events takes 37 to 38 ms against 121 to 125 ms in Python: the loop runs at the cost of the read calls themselves.
  • An Event is an 8-byte view into the buffer, no copy per event.
  • All IN_* constants exported; names up to 255 bytes; moves keep their cookie.

Changes

First public release, no earlier version.

Verified

Check Result
scripts/check.sh: 10 scenarios vs a Python ctypes oracle, each run twice PASS all
scripts/selfcheck.sh: 4 mutant runners all rejected
scripts/ci.sh on a pristine Ubuntu 24.04.5 VM PASS all

Known limits

  • Linux only.
  • Queue overflow (IN_Q_OVERFLOW) is not covered by the gate.
  • A program that declares its own read, write or mkdir with other argument types will not build; see docs/design.md.

Upgrade / run

git clone https://github.com/amarbaro/mojo-inotify && cd mojo-inotify && uv sync
mojo run -I src examples/quickstart.mojo

Commits

  • eb6f085 docs: CI badge
  • 992a6b4 build: uv.lock (mojo 1.1.0)
  • 6c7390a docs(inotify): README, api, design, skill, CI, bench vs Python
  • fe237b2 feat(inotify): non-blocking inotify with one read buffer and in-place events
  • c6d3811 test(gate): inotify scenarios, Python ctypes oracle, gate with mutant self-check
  • 7b00bd3 chore: repo layout, Apache-2.0, mojo>=1.1