Function brane_cli::run::run_instance

source ·
pub async fn run_instance<O: Write, E: Write>(
    drv_endpoint: impl AsRef<str>,
    state: &mut InstanceVmState<O, E>,
    workflow: &Workflow,
    profile: bool,
) -> Result<FullValue, Error>
Expand description

Runs the given compiled workflow on the remote instance.

This implements the other half of run_instance_vm(), which we separate to have some clients (*cough* IDE *cough*) do the compilation by themselves.

§Arguments

  • drv_endpoint: The brane-drv endpoint that we will connect to to run stuff (used for debugging only).
  • state: The InstanceVmState that we use to connect to the driver.
  • workflow: The already compiled Workflow to execute.
  • profile: If given, prints the profile timings to stdout if reported by the remote.

§Returns

A FullValue carrying the result of the snippet (or FullValue::Void).

§Errors

This function may error if anything in the whole shebang crashed. This can be things client-side, but also remote-side.