Cosim Launcher
This chapter introduces the Cosim Launcher: what it owns, how it is split into crates, and how to read the pages that follow.
The launcher is the Rust cosim program. It reads a YAML topology, resolves it into a plan for the local system, starts and supervises the host QEMU process and the device processes, and writes a verdict. Three crates separate the concerns: cosim-topology, cosim-runtime and cosim-cli.
What the Launcher Does
Load: read YAML documents, expand imports and templates, validate them and compute memory layouts (see YAML pipeline).
Plan: combine host facts such as the page size,
PATHand session directories into processes, arguments, readiness probes and resource paths.Run: start processes in dependency order, run readiness probes, coordinate shutdown with leases and escalate signals.
Finish: write the verdict and remove session resources;
cosim cleanrecovers resources left by an abnormally terminated launcher.
Chapter Contents
Recommended Reading Path
First use: read CLI, then YAML pipeline to see how input documents become a plan.
Startup or shutdown failures: Session lifecycle and Debugging sessions.
Launcher development: Rust workspace covers the crate split and adapter extension points.
Legacy scripts: Legacy shell launcher describes the old path and its boundaries.