Skip to main content

Crate hm_exec

Crate hm_exec 

Source
Expand description

Pluggable CI execution backends for hm run.

§Design

The pluggable boundary is the whole build, not a single step. ExecutionBackend::start accepts a RunRequest and returns a BackendHandle. Calling BackendHandle::into_parts splits the handle into:

§Backends

  • LocalBackend — runs the build in-process using a DAG scheduler that executes each step inside a lightweight VM via the hm-vm subsystem (a hm_vm::VmBackend + snapshot registry; Docker is one such backend).
  • CloudBackend — submits the build to the Harmont cloud and watches it over the REST SDK, emitting the same BuildEvent stream.

§Auth

This crate never reads credentials from disk. The caller constructs a HarmontClient and injects it; hm owns credential loading.

Re-exports§

pub use local::LocalBackend;
pub use cloud::CloudBackend;

Modules§

cloud
Cloud execution backend (submit + watch over the SDK).
local
Local execution backend.

Structs§

BackendHandle
A running build: an event stream to render + a control half (cancel/wait).
BuildOutcome
The terminal result of a build.
BuildRef
Stable identity for a build, shared by BuildAccepted and hm_exec::BuildOutcome. Local builds have a run_id only; cloud builds also have number/org.
Capabilities
Control
The control half of a running build: cancel + await the outcome.
Plan
A rendered, ready-to-run pipeline.
RunOptions
Per-run execution options threaded through from the CLI flags.
RunRequest
All inputs needed to start a build on any crate::ExecutionBackend.
SourceMeta
Git metadata for the worktree being submitted.
StepResultSummary

Enums§

BackendError
A backend failure returned across the ExecutionBackend boundary.
BuildStatus
Headline verdict. The CLI projects this to a process exit code; the int is a CLI-local concern, NOT the contract.
StepStatus

Traits§

ExecutionBackend
A pluggable execution backend. The boundary is the WHOLE build.

Type Aliases§

EventStream
Type alias for the boxed event stream yielded by BackendHandle::into_parts.
Result