Compare commits

..

2 commits

View file

@ -9,6 +9,7 @@
|___/
T H E N I G H T W A T C H
```
![nightwatch](docs/nightwatch.png)
> The city sleeps.
@ -29,17 +30,26 @@ It does not interfere.
It does not speculate.
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
@ -51,7 +61,7 @@ The Watch is written in **Zig** and built using the Zig build system.
## Build CLI
``` bash
```bash
zig build
```
@ -61,11 +71,11 @@ The executable will be located in:
## Install System-Wide
``` bash
```bash
zig build install
```
------------------------------------------------------------------------
---
# Using as a Zig Module
@ -74,7 +84,7 @@ other Zig programs.
In your `build.zig`:
``` zig
```zig
const nightwatch = b.dependency("nightwatch", .{
.target = target,
.optimize = optimize,
@ -85,29 +95,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