# jackin-runtime (https://jackin.tailrocks.com/reference/crates/jackin-runtime/)



{/* GENERATED from crates/jackin-runtime/README.md — edit the README, not this file */}

Container bootstrap pipeline — the orchestrator that turns a resolved workspace + role into a running (or restorable) container and attaches the operator to it. Holds the concrete `DockerApi`/`CommandRunner` implementations, image build, DinD sidecar management, mount materialization, and the launch phases.

This crate is broad by design; the code-health program tracks decomposing it into a thin facade over launch, attach, cleanup, image/build, backend, and instance-lifecycle leaves (see the runtime/launch behavioral spec before any extraction).

## What this crate owns [#what-this-crate-owns]

* The launch pipeline (`runtime`) and its phase contracts: profile validation, workspace/role materialization, trust/source checks, image materialization, env/auth resolution, Docker run, wait-for-state, teardown, foreground attach, cleanup classification.
* Backend clients (`apple_container_client`, `host_daemon`) and host-side exec (`exec_host`).
* Mount isolation integration (`isolation`), the reactive daemon (`reactive_daemon`), and wait-for-state (`spin_wait`).

## Architecture tier and allowed dependencies [#architecture-tier-and-allowed-dependencies]

**L1 application / orchestration.** Allowed workspace dependencies: `jackin-core`, `jackin-config`, `jackin-env`, `jackin-manifest`, `jackin-docker`, `jackin-image`, `jackin-diagnostics`, `jackin-launch-tui`, `jackin-host`, `jackin-protocol`, `jackin-isolation`, `jackin-instance`, `jackin-tui`, `jackin-build-meta`. It is the integration point — the broadest dependency fan-in.

## Structure [#structure]

| Module                                                                                                                                                                                                                  | Owns                        | Tests                                                                                            |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------ |
| <RepoFile path="crates/jackin-runtime/src/lib.rs">`lib.rs`</RepoFile>                                                                                                                                                   | crate root, re-exports      | —                                                                                                |
| <RepoFile path="crates/jackin-runtime/src/runtime.rs">`runtime.rs`</RepoFile> · <RepoFile path="crates/jackin-runtime/src/runtime.rs">`runtime/`</RepoFile>                                                             | launch pipeline + phases    | —                                                                                                |
| <RepoFile path="crates/jackin-runtime/src/apple_container_client.rs">`apple_container_client.rs`</RepoFile> · <RepoFile path="crates/jackin-runtime/src/apple_container_client.rs">`apple_container_client/`</RepoFile> | Apple container backend     | <RepoFile path="crates/jackin-runtime/src/apple_container_client/tests.rs">`tests.rs`</RepoFile> |
| <RepoFile path="crates/jackin-runtime/src/host_daemon.rs">`host_daemon.rs`</RepoFile> · <RepoFile path="crates/jackin-runtime/src/host_daemon.rs">`host_daemon/`</RepoFile>                                             | host daemon backend         | <RepoFile path="crates/jackin-runtime/src/host_daemon/tests.rs">`tests.rs`</RepoFile>            |
| <RepoFile path="crates/jackin-runtime/src/exec_host.rs">`exec_host.rs`</RepoFile> · <RepoFile path="crates/jackin-runtime/src/exec_host.rs">`exec_host/`</RepoFile>                                                     | host-side command exec      | <RepoFile path="crates/jackin-runtime/src/exec_host/tests.rs">`tests.rs`</RepoFile>              |
| <RepoFile path="crates/jackin-runtime/src/isolation.rs">`isolation.rs`</RepoFile> · <RepoFile path="crates/jackin-runtime/src/isolation.rs">`isolation/`</RepoFile>                                                     | mount isolation integration | <RepoFile path="crates/jackin-runtime/src/isolation/tests.rs">`tests.rs`</RepoFile>              |
| <RepoFile path="crates/jackin-runtime/src/reactive_daemon.rs">`reactive_daemon.rs`</RepoFile> · <RepoFile path="crates/jackin-runtime/src/reactive_daemon.rs">`reactive_daemon/`</RepoFile>                             | reactive daemon             | <RepoFile path="crates/jackin-runtime/src/reactive_daemon/tests.rs">`tests.rs`</RepoFile>        |
| <RepoFile path="crates/jackin-runtime/src/spin_wait.rs">`spin_wait.rs`</RepoFile> · <RepoFile path="crates/jackin-runtime/src/spin_wait.rs">`spin_wait/`</RepoFile>                                                     | wait-for-state              | <RepoFile path="crates/jackin-runtime/src/spin_wait/tests.rs">`tests.rs`</RepoFile>              |

## Public API [#public-api]

The launch entry points (`launch_role_runtime`, `load_role_with`, `run_launch_core`) consumed by the `jackin` CLI. The [runtime/launch behavioral spec](/reference/developer-reference/specs/runtime-launch/) is the oracle for any extraction.

## How to verify [#how-to-verify]

```sh
cargo nextest run -p jackin-runtime
cargo clippy -p jackin-runtime --all-targets -- -D warnings
```
