pub struct ResolvedCargoBuildInputs { /* private fields */ }Expand description
Resolved exact inputs and identity for one WasmBuildSpec.
The snapshot can be resolved again after an external operation to detect source, configuration, toolchain, argument, or environment changes. Clones share immutable input and exclusion lists while retaining independent timing values.
Implementations§
Source§impl ResolvedCargoBuildInputs
impl ResolvedCargoBuildInputs
Sourcepub fn artifact_paths(&self) -> Result<&[PathBuf], WasmBuildError>
pub fn artifact_paths(&self) -> Result<&[PathBuf], WasmBuildError>
Borrow declared output paths after metadata admits the selected targets.
These are paths under the specification’s target_dir, not retained or
captured outputs. External producers must execute the same recipe under
source/target custody and validate before consuming or capturing bytes.
Generic snapshots for non-Wasm packages remain useful independently.
§Errors
Returns missing/non-cdylib/renamed targets or colliding artifact names.
Sourcepub const fn fingerprint(&self) -> InputDigest
pub const fn fingerprint(&self) -> InputDigest
Exact build fingerprint including Cargo inputs, tools, arguments, and environment.
Sourcepub const fn input_digest(&self) -> InputDigest
pub const fn input_digest(&self) -> InputDigest
Semantic digest of selected Cargo sources and workspace configuration.
Unlike Self::validation_digest, this may remain unchanged after an
unrelated host-only workspace manifest or lockfile update.
Sourcepub const fn validation_digest(&self) -> InputDigest
pub const fn validation_digest(&self) -> InputDigest
Conservative digest of every raw source and configuration input.
This digest is used for mutation guards. It may change while
Self::input_digest and Self::fingerprint remain unchanged.
Sourcepub fn inputs(&self) -> &[CargoBuildInput]
pub fn inputs(&self) -> &[CargoBuildInput]
Stable logical labels and conservative resolved validation paths.
Sourcepub fn exclusions(&self) -> &[PathBuf]
pub fn exclusions(&self) -> &[PathBuf]
Generated-state roots excluded while recursively hashing local inputs.
These exclusions are derived by IC Build; callers cannot add arbitrary exclusions through this snapshot.
Sourcepub const fn timings(&self) -> WasmInputResolutionTimings
pub const fn timings(&self) -> WasmInputResolutionTimings
Timings for tool identity, metadata, discovery, and content hashing.
Sourcepub fn is_current(&self, spec: &WasmBuildSpec) -> Result<bool, WasmBuildError>
pub fn is_current(&self, spec: &WasmBuildSpec) -> Result<bool, WasmBuildError>
Resolve spec again and report whether its exact identity is unchanged.
§Errors
Returns specification, tool/metadata, filesystem or input-resolution errors.
Sourcepub fn is_current_with_probe_policy(
&self,
spec: &WasmBuildSpec,
policy: &mut CargoInputProbePolicy<'_>,
) -> Result<bool, WasmBuildError>
pub fn is_current_with_probe_policy( &self, spec: &WasmBuildSpec, policy: &mut CargoInputProbePolicy<'_>, ) -> Result<bool, WasmBuildError>
Resolve again using the caller’s probe deadline, cancellation and cleanup.
Reusing the same policy preserves its absolute deadline across acquisitions. Filesystem discovery and hashing are outside the probe deadline.
§Errors
Returns the same errors as resolve_cargo_build_inputs_with_probe_policy.
Sourcepub fn is_content_current(&self) -> Result<bool, WasmBuildError>
pub fn is_content_current(&self) -> Result<bool, WasmBuildError>
Rehash the already discovered Cargo source/configuration set.
This is cheaper than rerunning Cargo metadata and is intended for before/after guards around external artifact transformations. Resolve a new snapshot to observe tool, argument, environment, or dependency-graph identity changes between separate acquisitions.
§Errors
Returns filesystem errors while rehashing the previously discovered inputs.