Headless Xila runtime
Exact shell and guest commands, image defaults, persistence, mounts, and limits of Xila's headless runtime.
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.
Image and executable
Section titled “Image and executable”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.
Command syntax
Section titled “Command syntax”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]...shellstarts 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 overridingUserwith--env.runstarts 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 PATHselects the mutable LittleFS disk. The default is/var/lib/xila/drive.img.--seed PATHselects 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=noneis the only accepted Xila network mode. Docker’s separate--network nonedisables container networking.--mount host=...,xila=...,ro|rwexposes a selected runtime-host directory to Xila’s VFS. The optionaluid,gid,file_mode, anddirectory_modesettings control ownership and permissions.--env KEY=VALUEadds a guest environment setting. Repeat the option for multiple settings.--helpand--versionprint command-line interface information.
Isolation and durability
Section titled “Isolation and durability”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).
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.
Related
Section titled “Related”- Run Xila with Docker for shell and guest commands.
- Wasm runtime.
-
examples/native/src/bin/xila-runtime.rs. Dockerfile.runtime..github/workflows/runtime.yml.