This repository was archived by the owner on Nov 22, 2026. It is now read-only.
Repository navigation
mojo-inotify v0.1.0
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
readcalls themselves. - An
Eventis 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,writeormkdirwith 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
eb6f085docs: CI badge992a6b4build: uv.lock (mojo 1.1.0)6c7390adocs(inotify): README, api, design, skill, CI, bench vs Pythonfe237b2feat(inotify): non-blocking inotify with one read buffer and in-place eventsc6d3811test(gate): inotify scenarios, Python ctypes oracle, gate with mutant self-check7b00bd3chore: repo layout, Apache-2.0, mojo>=1.1