pub struct WasmBuildInputSnapshot<'guard> { /* private fields */ }Expand description
Immutable prepared Cargo input resolution shared by concurrent readers.
Preparation resolves the complete declared specification set while the
caller holds a genuine source write-exclusion guard. Reader batches may run
concurrently through &self, but cannot introduce specifications that
were not declared during preparation.
Implementations§
Source§impl<'guard> WasmBuildInputSnapshot<'guard>
impl<'guard> WasmBuildInputSnapshot<'guard>
Sourcepub fn prepare_assuming_sources_immutable<Guard: ?Sized>(
_source_write_guard: &'guard Guard,
specs: &[WasmBuildSpec],
) -> Result<Self, WasmBuildError>
pub fn prepare_assuming_sources_immutable<Guard: ?Sized>( _source_write_guard: &'guard Guard, specs: &[WasmBuildSpec], ) -> Result<Self, WasmBuildError>
Resolve and freeze the complete specification set under a source lease.
The guard must prevent mutation of every Cargo/rustc executable, manifest, configuration file, discovered source, declared additional input, and relevant environment value used by the supplied specifications. The type system cannot verify guard provenance.
§Errors
Returns specification, tool/metadata, filesystem or input-resolution errors.
Sourcepub fn build_batch(
&self,
specs: &[LabeledWasmBuildSpec],
config: WasmBuildBatchConfig,
progress: Option<(WasmBuildProgressConfig, &mut dyn FnMut(WasmBuildBatchProgressEvent))>,
spawn: impl FnMut(&mut Command) -> Result<OwnedChild>,
) -> Result<WasmBuildBatchReport, WasmBuildBatchContractError>
pub fn build_batch( &self, specs: &[LabeledWasmBuildSpec], config: WasmBuildBatchConfig, progress: Option<(WasmBuildProgressConfig, &mut dyn FnMut(WasmBuildBatchProgressEvent))>, spawn: impl FnMut(&mut Command) -> Result<OwnedChild>, ) -> Result<WasmBuildBatchReport, WasmBuildBatchContractError>
Build a collect-all batch with explicit orchestration and optional progress.
Source lease, feature isolation and retention match independent batches.
spawn selects Cargo child/group custody and cleanup, independently of progress.
Prepared snapshots reject specifications absent during preparation.
§Errors
Returns invalid labels, an invalidated lease or an unprepared specification error before work. Individual build failures remain in the report.
Sourcepub fn metrics(&self) -> WasmBuildInputSnapshotMetrics
pub fn metrics(&self) -> WasmBuildInputSnapshotMetrics
Current preparation, reader-reuse, and invalidation metrics.