Skip to main content

snapshot_component

Function snapshot_component 

Source
pub fn snapshot_component(
    component_dir: &Path,
    staging_root: &Path,
    generation: BuildGeneration,
) -> Result<Snapshot, BuildError>
Expand description

Copies component/gleam.toml and component/src/** into the generation’s staging directory and digests the copied content. A leftover directory from a superseded attempt at the same generation is removed first — staging is always a fresh, complete copy.

§Errors

BuildError::Io with the failing path.