Skip to main content

spawn

Function spawn 

Source
pub async fn spawn(
    uri_str: &str,
    path: Option<&str>,
    vcs: Option<&str>,
    dist_preference: Option<&str>,
    bond: bool,
    sink: &dyn EventSink,
) -> Result<SpawnOutput, HyphaError>
Expand description

Handle the spore spawn command - create a working copy of a spore

Spawn flow for archive sources (default):

  1. Download and extract archive to user directory
  2. If –vcs git: initialize git repo with initial commit
  3. Update spore.core.json: add spawn reference, clear domain

Spawn flow for git sources (–dist git):

  1. Clone remote repo to cache bare repo (if not exists)
  2. Clone from cache bare repo to user directory
  3. If –vcs not specified with git dist: keep .git from clone
  4. Update spore.core.json: add spawn reference, clear domain

Spawn a spore to a local directory — library level.