Skip to content
Xila

Headless Xila runtime

Exact shell and guest commands, image defaults, persistence, mounts, and limits of Xila's headless runtime.

Last updatedEdit page

The headless runtime runs a Xila shell or a virtual file system (VFS) executable. The interfaces are defined in examples/native/src/bin/xila-runtime.rs and Dockerfile.runtime.

The Platforms runtime workflow builds the image from Dockerfile.runtime, smoke-tests it, and publishes it to ghcr.io/xila-project/xila-runtime on eligible pushes. The latest tag follows the default branch. Releases receive matching v* tags. Published builds receive a commit SHA tag.

The image runs as UID/GID 10001. It keeps its mutable disk in /var/lib/xila and an immutable reference image at /usr/share/xila/base.img. Its entrypoint is /usr/bin/xila-runtime. Its default command is shell --network=none. The container currently supports linux/amd64 only, not embedded hardware.

The executable accepts this syntax:

xila-runtime shell [OPTIONS]
xila-runtime run [OPTIONS] -- <Xila executable> [arguments...]

Both modes accept these options:

[--disk PATH] [--seed PATH] [--network=none]
[--mount host=PATH,xila=PATH,ro|rw[,uid=N,gid=N,file_mode=OCTAL,directory_mode=OCTAL]]
[--env KEY=VALUE]...
  • shell starts Xila’s built-in /applications/executables/command_line_shell. It needs stdin to log in. A fresh seeded installation accepts administrator with an empty password. It forbids overriding User with --env.
  • run starts an absolute executable path in Xila’s VFS after --. For a WASI guest, use /applications/executables/wasm, then the guest module’s Xila VFS path, then any arguments.
  • --disk PATH selects the mutable LittleFS disk. The default is /var/lib/xila/drive.img.
  • --seed PATH selects the seed image. Xila uses it only when no disk exists. The default is /usr/share/xila/base.img. The native tutorial shows the seed-to-live-disk flow with a diagram.
  • --network=none is the only accepted Xila network mode. Docker’s separate --network none disables container networking.
  • --mount host=...,xila=...,ro|rw exposes a selected runtime-host directory to Xila’s VFS. The optional uid, gid, file_mode, and directory_mode settings control ownership and permissions.
  • --env KEY=VALUE adds a guest environment setting. Repeat the option for multiple settings.
  • --help and --version print command-line interface information.

Mount host directories into Docker first, then expose them separately through Xila’s --mount. A Docker bind mount alone gives no Xila VFS access. The runtime does not pass ambient host environment variables to guests. Use read-only mounts unless writes are necessary.

The following diagram shows the two mounts that a host directory needs before a guest can read it from the Xila virtual file system (VFS).

Two mounts from a host directory to the Xila virtual file systemHost directoryDocker bind mountxila-runtime processXila --mount (ro or rw)Xila VFS path, for example /fixtures

The Docker bind mount exposes the host directory at a container path, for example /mnt/xila/fixtures, where the xila-runtime process can open it. The separate --mount host=PATH,xila=PATH,ro|rw option then mounts that container path in the VFS, for example at /fixtures. A guest reads the files only at the Xila VFS path: without the second mount, the bind-mounted files stay invisible to the guest.

A writable volume at /var/lib/xila retains the LittleFS disk across container runs. A newer seed never overwrites an existing disk. On SIGINT and SIGTERM, the runtime tries to flush and unmount the disk before exiting. Abrupt termination may lose recent writes. The image is non-root. It supports a read-only container root filesystem with writable state and a temporary /tmp.

This runner does not start a graphics or network manager. The graphical headless driver and its debug transport are separate from this executable. Guests are limited to the WASI API subset that Xila implements.