shuru run — data flowTap any stage to expand details
The binary starts, clap parses argv into a typed Cli struct, and dispatches to the Commands::Run branch.
Reads shuru.json (or the path from --config) from the current directory. Falls back to an empty default config if the file doesn't exist.
CLI flags win over config file. If no command is provided anywhere, defaults to /bin/sh.
.idx (CAS) or .ext4, else base image~/.local/share/shuru/instances/{pid}/clone_file() (reflink on macOS)disk_sizeNetworkStackProxyEngineSHURU_STORAGE=direct env to bypass.uri() for the VMBuilder pattern assembles the full VM config and constructs a Sandbox backed by a platform-specific VirtualMachine (Darwin/Linux).
.build() → Sandboxsandbox.start() boots the guest kernelstart_port_forwarding() binds TCP listeners on 127.0.0.1:{host_port}26262 and relays bytes bidirectionally/usr/local/share/ca-certificates/shuru-proxy.crtupdate-ca-certificates --fresh in guestisatty(stdin)26261 (retry ×50)ExecRequest { tty: true, rows, cols }26261ExecRequest { tty: false }Enabled with --stdio. Speaks JSON-RPC 2.0 on stdin/stdout.
Each method dispatches to a background thread; results and notifications stream back as JSON.
sandbox.stop()nbd_handle.save_checkpoint(path) writes .idx~/.local/share/shuru/instances/{pid}/