pub enum Request {
Show 17 variants
Ping,
Shutdown,
Status,
Lookup {
cache_key: String,
},
Store {
cache_key: String,
artifact: ArtifactData,
},
SessionStart {
client_pid: u32,
working_dir: NormalizedPath,
log_file: Option<NormalizedPath>,
track_stats: bool,
journal_path: Option<NormalizedPath>,
profile: bool,
},
Compile {
session_id: String,
args: Vec<String>,
cwd: NormalizedPath,
compiler: NormalizedPath,
env: Option<Vec<(String, String)>>,
stdin: Vec<u8>,
},
SessionEnd {
session_id: String,
},
Clear,
CompileEphemeral {
client_pid: u32,
working_dir: NormalizedPath,
compiler: NormalizedPath,
args: Vec<String>,
cwd: NormalizedPath,
env: Option<Vec<(String, String)>>,
stdin: Vec<u8>,
},
LinkEphemeral {
client_pid: u32,
tool: NormalizedPath,
args: Vec<String>,
cwd: NormalizedPath,
env: Option<Vec<(String, String)>>,
},
SessionStats {
session_id: String,
},
FingerprintCheck {
cache_file: NormalizedPath,
cache_type: String,
root: NormalizedPath,
extensions: Vec<String>,
include_globs: Vec<String>,
exclude: Vec<String>,
},
FingerprintMarkSuccess {
cache_file: NormalizedPath,
},
FingerprintMarkFailure {
cache_file: NormalizedPath,
},
FingerprintInvalidate {
cache_file: NormalizedPath,
},
ListRustArtifacts,
}Expand description
A request from client to daemon.
Variants§
Ping
Health check.
Shutdown
Request daemon shutdown.
Status
Request daemon status/statistics.
Lookup
Look up a cached artifact by cache key.
Store
Store a compilation artifact.
SessionStart
Start a new session with the daemon.
Fields
working_dir: NormalizedPathClient working directory.
log_file: Option<NormalizedPath>Optional path to a log file for this session.
journal_path: Option<NormalizedPath>Path for per-session JSONL compile journal (must end in .jsonl).
profile: boolIssue #256: opt in to the extended journal schema. When true, the daemon populates crate_name, crate_type, output_ext, and self_profile_ns on every compile journal line for the duration of this session. When false, behavior is identical to releases before the flag existed (no new allocations, no new fields).
Compile
Compile a source file within an existing session.
Fields
cwd: NormalizedPathWorking directory for the compilation.
compiler: NormalizedPathPath to the compiler executable (required).
env: Option<Vec<(String, String)>>Client environment variables to pass to the compiler process.
If None, the daemon’s own environment is inherited (backward compat).
If Some, the compiler process uses exactly these env vars.
stdin: Vec<u8>Bytes the wrapper read from its own stdin, ferried to the compiler
child’s stdin over IPC. Empty = no stdin (Stdio::null on the
daemon side). cargo’s RUSTC_WRAPPER path normally yields zero
bytes here; the field exists so that rustc - and similar
stdin-consuming invocations work transparently.
SessionEnd
End a session.
Clear
Clear all caches (artifacts, metadata, dep graph).
CompileEphemeral
Single-roundtrip ephemeral compile: session start + compile + session end in one message. Used by the CLI in drop-in wrapper mode to avoid 3 IPC roundtrips per invocation.
Fields
working_dir: NormalizedPathClient working directory.
compiler: NormalizedPathPath to the compiler executable.
cwd: NormalizedPathWorking directory for the compilation.
LinkEphemeral
Single-roundtrip ephemeral link/archive: used for zccache ar ... or
zccache ld ... in drop-in wrapper mode.
Fields
tool: NormalizedPathPath to the linker/archiver tool (ar, ld, lib.exe, link.exe, etc.).
cwd: NormalizedPathWorking directory for the link operation.
SessionStats
Query per-session statistics without ending the session. NOTE: Appended at end to preserve bincode variant indices.
FingerprintCheck
Check if files have changed since last successful fingerprint. NOTE: Appended at end to preserve bincode variant indices.
Fields
cache_file: NormalizedPathPath to the cache file (e.g., .cache/lint.json).
root: NormalizedPathRoot directory to scan.
extensions: Vec<String>File extensions to include (without dot, e.g., “rs”, “cpp”).
Empty = all files. Conflicts with include_globs.
FingerprintMarkSuccess
Mark the previous fingerprint check as successful.
Fields
cache_file: NormalizedPathPath to the cache file.
FingerprintMarkFailure
Mark the previous fingerprint check as failed.
Fields
cache_file: NormalizedPathPath to the cache file.
FingerprintInvalidate
Invalidate a fingerprint cache (delete all state).
Fields
cache_file: NormalizedPathPath to the cache file.
ListRustArtifacts
List all cached Rust artifacts with their output paths. NOTE: Appended at end to preserve bincode variant indices.