Skip to main content

Module server

Module server 

Source
Expand description

The per-project daemon: holds the index resident in RAM, keeps it fresh, and answers queries over a local IPC endpoint (an AF_UNIX socket on Unix, a loopback-TCP port on Windows — see crate::transport). Owning that endpoint is the single-instance lock — a second daemon that loses the race exits. The daemon serves immediately: a warm start loads the snapshot and answers at once; a cold start answers via a full ripgrep scan (the correct fallback) until the first build finishes. See docs/indexing.md and docs/index-and-storage.md.

Functions§

run
Run the daemon for root in the foreground. Returns once the socket can’t be owned (another daemon is already running) or on a fatal error.