Skip to main content

ic_testkit/artifacts/
mod.rs

1//! Host-side artifact discovery, freshness, and Wasm build helpers.
2//!
3//! These functions keep integration-test artifacts in caller-selected target
4//! directories and contain no application-specific package or profile policy.
5//! Independent Wasm batches remain sequential; [`WasmBuildSession`] adds
6//! explicit cross-call resolution reuse, while [`WasmBuildInputSnapshot`]
7//! prepares a fixed specification set for concurrent readers. Both require a
8//! caller-held source lease.
9
10mod cache_fs;
11mod digest;
12mod icp;
13mod tool;
14mod transaction;
15mod transaction_batch;
16mod wasm;
17mod wasm_batch;
18mod wasm_cache;
19mod workspace;
20
21#[cfg(test)]
22mod test_support;
23
24pub use cache_fs::{ArtifactCacheMaintenance, ArtifactCachePrunePolicy, ArtifactCachePruneReport};
25pub use digest::InputDigest;
26pub use icp::{
27    WatchedInputSnapshot, icp_artifact_ready_for_build, icp_artifact_ready_with_snapshot,
28};
29pub use tool::resolve_executable;
30pub use transaction::{
31    ArtifactBuildTransaction, ArtifactCacheArtifact, ArtifactCacheError, ArtifactCacheOutcome,
32    ArtifactCachePreparation, ArtifactCacheRecord, ArtifactCacheSpec, ArtifactCacheTimings,
33    ArtifactOutputValidation, prepare_artifact_cache, prune_artifact_cache,
34};
35pub use transaction_batch::{
36    ArtifactCacheBatchContractError, ArtifactCacheBatchEntry, ArtifactCacheBatchFailedEntry,
37    ArtifactCacheBatchFailure, ArtifactCacheBatchFailurePhase, ArtifactCacheBatchFailureTimings,
38    ArtifactCacheBatchMetrics, ArtifactCacheBatchOutcomeEntry, ArtifactCacheBatchReport,
39    LabeledArtifactCacheSpec, build_artifact_caches_batch,
40};
41pub use wasm::{read_wasm, wasm_artifacts_ready, wasm_path};
42pub use wasm_batch::{
43    LabeledWasmBuildSpec, WasmBuildBatchConfig, WasmBuildBatchContractError, WasmBuildBatchEntry,
44    WasmBuildBatchFailure, WasmBuildBatchMaintenanceEntry, WasmBuildBatchMetrics,
45    WasmBuildBatchOutcomeEntry, WasmBuildBatchProgressEvent, WasmBuildBatchReport,
46    WasmBuildFailureDetails, WasmBuildInputSnapshot, WasmBuildInputSnapshotMetrics,
47    WasmBuildSession, WasmBuildSessionMetrics, build_wasm_canisters_cached_batch,
48    build_wasm_canisters_cached_batch_with_config,
49    build_wasm_canisters_cached_batch_with_config_and_progress,
50    build_wasm_canisters_cached_batch_with_progress,
51};
52pub use wasm_cache::{
53    CargoBuildInput, ResolvedCargoBuildInputs, SharedIncrementalTargetInspection,
54    SharedIncrementalTargetMaintenance, SharedIncrementalTargetMaintenanceConfig,
55    SharedIncrementalTargetMaintenanceFailureMode, SharedIncrementalTargetMaintenanceOutcome,
56    SharedIncrementalTargetPrunePolicy, WasmBuildCacheMode, WasmBuildError, WasmBuildFailurePhase,
57    WasmBuildFailureTimings, WasmBuildOutcome, WasmBuildOutputStream, WasmBuildPhase,
58    WasmBuildProgressConfig, WasmBuildProgressEvent, WasmBuildProgressOutcome,
59    WasmBuildProgressPhase, WasmBuildRecord, WasmBuildSpec, WasmBuildTimings,
60    WasmInputResolutionTimings, build_wasm_canisters_cached,
61    build_wasm_canisters_cached_with_progress, inspect_shared_incremental_target,
62    maintain_shared_incremental_target, maintain_shared_incremental_target_at_most_every,
63    prune_wasm_build_cache, resolve_cargo_build_inputs,
64};
65pub use workspace::{test_target_dir, workspace_root_for};