pub enum AgentRequest {
Show 26 variants
Hello {
protocol: u8,
client_version: String,
},
BeginTask {
task: String,
},
CommitTask {
run: String,
},
FindBlob {
digest: CacheDigest,
},
FindBlobs {
digests: Vec<CacheDigest>,
},
StoreBlob {
digest: CacheDigest,
source: PathBuf,
},
FindActionResult {
action: CacheDigest,
},
RecordActionHit {
action: CacheDigest,
restore: RestoreStats,
crate_name: Option<String>,
},
RecordBypass {
kind: String,
},
RecordUnconsulted,
RecordCompilerInvocation {
outcome: String,
crate_name: Option<String>,
duration_ns: u64,
},
RecordActionVerification {
matched: bool,
restore: RestoreStats,
},
StoreActionResult {
result: RemoteActionResult,
},
FindActionPrediction {
task: String,
invocation: CacheDigest,
},
RecordActionPrediction {
task: String,
prediction: ActionPrediction,
},
FindExecutableIdentity {
executable: PathBuf,
environment: BTreeMap<String, Option<String>>,
},
StoreExecutableIdentity {
executable: PathBuf,
environment: BTreeMap<String, Option<String>>,
stdout: Vec<u8>,
pins: Vec<PinnedFile>,
},
RecordWarning {
message: String,
},
FindFileDigests {
scope: FileDigestScope,
files: Vec<FileIdentity>,
},
RecordFileDigests {
scope: FileDigestScope,
entries: Vec<RecordedFileDigest>,
},
JoinActionPromise {
adapter: String,
invocation: CacheDigest,
},
CompleteActionPromise {
claim: String,
prediction: ActionPrediction,
},
ResolveFileDigests {
scope: FileDigestScope,
files: Vec<FileIdentity>,
},
RecordWrapperTiming {
timing: WrapperTiming,
},
RecordError {
message: String,
},
RecordDebug {
target: String,
message: String,
},
}Expand description
A request accepted by the task-scoped cache agent.
Variants§
Hello
Negotiate protocol and application versions.
Fields
BeginTask
Begin a prediction-manifest run for a stable Cargo or task identity.
CommitTask
Commit predictions collected by an earlier Self::BeginTask.
FindBlob
Resolve a blob to a session-verified local CAS path.
Fields
digest: CacheDigestBlob to resolve.
FindBlobs
Resolve blobs to session-verified local CAS paths.
Fields
digests: Vec<CacheDigest>Blobs to resolve, preserving request order in the response.
StoreBlob
Import a file into the local content-addressed store.
FindActionResult
Look up an action-result record.
Fields
action: CacheDigestAction digest to resolve.
RecordActionHit
Account for a successfully restored cache hit.
Fields
action: CacheDigestAction that supplied the outputs.
restore: RestoreStatsRestoration work performed by the adapter.
RecordBypass
A compilation the adapter declined to cache, grouped by reason.
RecordUnconsulted
A compilation the adapter could not look up, having no key to look up with. Distinct from a bypass: these are cached once compiled.
RecordCompilerInvocation
Account for one real compiler invocation performed by the adapter.
Fields
RecordActionVerification
Account for a cache hit that was rebuilt for correctness verification.
Fields
restore: RestoreStatsRestoration work performed before rebuilding.
StoreActionResult
Store an action-result record locally and enqueue remote publication.
Fields
result: RemoteActionResultAction-result record to store.
FindActionPrediction
Find an earlier input prediction for a task and invocation.
Fields
invocation: CacheDigestDigest of the compiler invocation without discovered inputs.
RecordActionPrediction
Record an input prediction after a successful compilation.
Fields
prediction: ActionPredictionAdapter-owned prediction record.
FindExecutableIdentity
Find cached identity output for an executable and environment.
Fields
StoreExecutableIdentity
Cache identity output for an executable and environment.
Fields
pins: Vec<PinnedFile>Files the probe read, as they were when it read them, which pin the output beyond this session so the next one can skip the probe. Empty keeps the identity for this session only.
RecordWarning
Surface a shim diagnostic through the session that owns the build.
A shim must not print diagnostics itself: its stderr belongs to the compiler it stands in for, and build scripts read that stream as part of the compiler’s answer – cc-rs treats any stderr output from a flag probe as “unsupported”, which changes the flags of every compilation that follows and, with them, every action key the build produces.
Appended rather than grouped with the other Record* requests it
belongs beside: these variants carry no repr, so inserting one moves
the discriminant of every variant after it, and a break nobody asked
for is worth less than the grouping.
FindFileDigests
Find session-recorded digests for files with these identities.
Fields
scope: FileDigestScopeWhat the recorded digests may stand in for.
files: Vec<FileIdentity>File identities to resolve, preserving request order in the response.
RecordFileDigests
Record digests of files a shim hashed or wrote this session.
Fields
scope: FileDigestScopeWhat the recorded digests may stand in for.
entries: Vec<RecordedFileDigest>Hashed files and the identities their digests describe.
JoinActionPromise
Join or claim an invocation-wide promise through the cache server.
Fields
invocation: CacheDigestDigest of the compiler invocation before input discovery.
CompleteActionPromise
Fulfill a claimed promise after its action result is remotely durable.
Fields
claim: StringOpaque claim token returned by Self::JoinActionPromise.
prediction: ActionPredictionPrediction through which waiters reconstruct the final action key.
ResolveFileDigests
Resolve file digests, coalescing concurrent reads through the agent.
Fields
scope: FileDigestScopeWhat the digest and any accompanying validation may stand in for.
files: Vec<FileIdentity>File identities to resolve, preserving request order.
RecordWrapperTiming
Record exclusive wrapper phase durations and bounded trace spans.
Fields
timing: WrapperTimingCompleted invocation timings.
RecordError
Surface a fatal shim diagnostic through the session that owns the build.
This is appended to preserve every existing request variant and wire
shape while allowing a caller to distinguish fatal acknowledgement from
Self::RecordWarning and fall back locally when it is not accepted.
RecordDebug
Emit a routine shim log through the owning session’s logger. Filtering uses the original target; these records never consume the warning/error allowance or enter compiler output.
Trait Implementations§
Source§impl Clone for AgentRequest
impl Clone for AgentRequest
Source§fn clone(&self) -> AgentRequest
fn clone(&self) -> AgentRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more