Skip to main content

Module cli

Module cli 

Source
Expand description

The command-line front end: boots the operating system against a real terminal.

This lives in the library rather than in a binary so that more than one entry point can reach it. There is one inside this workspace and one in the launcher package alongside the repositories, and neither should hold a second copy of the logic.

  cargo run                  a fresh disk with a few files on it
  cargo run -- disk.tfs      that image, created if it does not exist
  cargo run -- --format d    a fresh image written to d, overwriting it

The image is written back when the shell exits, so anything created inside the machine is still there next time. Leave with exit or Ctrl-D; Ctrl-C kills the host before it can write.

Functionsยง

main
Runs the front end. Exits the process on failure.