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, PATH and 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 clean recovers resources left by an abnormally terminated launcher.

Chapter Contents