From a951162c52d8af11527e4f0b38c84d5bb2468252 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Sun, 8 Mar 2026 20:10:56 +0100 Subject: [PATCH 1/2] docs: reformat README.md --- README.md | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 91d4494..7857046 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,15 @@ ``` - _ _ _ _ _ _ _ _ _ - | \ | (_) | | | | | \ / | | | | | - | \| |_ __ _| |__ | |_ \ \ _ / /_ _| |_ __| |___ - | . ` | |/ _` | '_ \| __| \ ` ' / _` | __|/ _| '_ \ - | |\ | | (_| | | | | |_ \ / (_| | |_| (_| | | | - |_| \_|_|\__, |_| |_|\__| \_|_/ \__,_|\__|\__|_| |_| - __/ | - |___/ - T H E N I G H T W A T C H + _ _ _ _ _ _ _ _ _ + | \ | (_) | | | | | \ / | | | | | + | \| |_ __ _| |__ | |_ \ \ _ / /_ _| |_ __| |___ + | . ` | |/ _` | '_ \| __| \ ` ' / _` | __|/ _| '_ \ + | |\ | | (_| | | | | |_ \ / (_| | |_| (_| | | | + |_| \_|_|\__, |_| |_|\__| \_|_/ \__,_|\__|\__|_| |_| + __/ | + |___/ + T H E N I G H T W A T C H ``` + ![nightwatch](docs/nightwatch.png) > The city sleeps. @@ -29,7 +30,7 @@ It does not interfere. It does not speculate. It simply keeps watch. ------------------------------------------------------------------------- +--- ## Features @@ -51,7 +52,7 @@ The Watch is written in **Zig** and built using the Zig build system. ## Build CLI -``` bash +```bash zig build ``` @@ -61,11 +62,11 @@ The executable will be located in: ## Install System-Wide -``` bash +```bash zig build install ``` ------------------------------------------------------------------------- +--- # Using as a Zig Module @@ -74,7 +75,7 @@ other Zig programs. In your `build.zig`: -``` zig +```zig const nightwatch = b.dependency("nightwatch", .{ .target = target, .optimize = optimize, @@ -85,29 +86,29 @@ exe.root_module.addImport("nightwatch", nightwatch.module("nightwatch")); In your Zig source: -``` zig +```zig const nightwatch = @import("nightwatch"); ``` You now have programmatic access to the tracking engine. ------------------------------------------------------------------------- +--- # CLI Usage -``` bash +```bash nightwatch [{path}..] ``` Run: -``` bash +```bash nightwatch --help ``` for full command documentation. ------------------------------------------------------------------------- +--- # Philosophy From a2523a5b53a1fcd25e9a554afbc8b1f34e2b96ab Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Sun, 8 Mar 2026 20:11:18 +0100 Subject: [PATCH 2/2] docs: add some more platform support details to the readme --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7857046..ade2a53 100644 --- a/README.md +++ b/README.md @@ -35,12 +35,21 @@ It simply keeps watch. ## Features - Recursive directory tree tracking -- Deterministic multi-platform support (Linux, FreeBSD, MacOS, Windows) +- Deterministic multi-platform support (Linux, macOS, FreeBSD, OpenBSD, NetBSD, DragonFly BSD, Windows) - Lightweight and fast - Embeddable Zig module API - Standalone CLI executable ------------------------------------------------------------------------- +### Platform backends + +| Platform | Backend | Notes | +| --------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------ | +| Linux | inotify | Threaded mode (default) or poll mode (`-Dlinux_read_thread=false`) | +| macOS | kqueue (default) or FSEvents (`-Dmacos_fsevents=true`) | FSEvents requires Xcode frameworks | +| FreeBSD, OpenBSD, NetBSD, DragonFly BSD | kqueue | | +| Windows | ReadDirectoryChangesW | | + +--- # Installation