from man entr:
Rebuild project if a source file is modified or added to the src/ di‐
rectory:
$ while sleep 0.1; do ls src/*.rb | entr -d make; done
Though I shudder to think of the amount of code needed to rewrite that in a compiled language while sticking to the principle of not reinventing anything remotely wheel-shaped. (Btw the libinotify/src is like 2.3kloc, inotify cli <1.2kloc.)