Skip to content

docs: fill the SDK documentation gaps and refresh the README's features - #110

Merged
pi0 merged 2 commits into
mainfrom
docs/sdk-gaps
Nov 30, 2026
Merged

pi0 merged 2 commits into
mainfrom
docs/sdk-gaps

Conversation

@pi0x

@pi0x pi0x commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

The SDK's exports and createKernel options were compared against the README's "Use it from JavaScript" section and docs/1.sdk/. This fills the gaps.

New docs pages

  • Host commands (/sdk/commands): commands, addCommand() and removeCommand(), the handler's context, and how its return value ends the guest process.
  • Tailscale (/sdk/tailscale): moved over from the README, plus the options it lacked (ephemeral, tags, controlPublicKey for headscale in a page) and the vm.tailscale methods.
  • Snapshots (/sdk/snapshots): snapshot() with stop, commit and hold, restore, encodeSnapshot() and decodeSnapshot(), what a restore needs and what survives it, and detachable sessions with attach().

Updated docs pages

  • Network: directBackend() and wispBackend() carry UDP now, so the page no longer says "no UDP beyond DHCP and DNS". Adds hostLoopback and fetchRoutes().
  • Display is split in two: Display and Input (/sdk/display: the framebuffer and evdev) and a new Sound and Camera page (/sdk/sound: playback, plus the microphone with soundIn and createAudioIn(), and the camera with camera, createCamera() and H.264). The Getting Started cards link to both.
  • Graphics (now "GL, Vulkan and Video"): adds VA-API (va).
  • Boot Options: adds signal, consoleSize, log, onDiskError, memoryFallbackMiB, profile and vm.distro, and lists soundIn and camera among the devices.
  • Introduction (docs/index.md): the device list now includes the microphone, camera, virtio-gpu, VA-API, serial, Bluetooth and USB.
  • The SDK pages are renumbered so the new ones sit next to related topics. URLs don't change because the number prefix is stripped. The sidebar order was checked with undocs build.

README

  • The introduction's Devices list and "What you can do with it" now cover desktop apps on the GPU (Wayland/X11 windows, GL, Vulkan, VA-API), x86 binaries through box64 and qemu-user, hardware from a page (serial, Bluetooth, USB), the OPFS data disk, snapshots, Tailscale and host commands.
  • New SDK sections: Host commands, Video in the guest, Save and restore a machine. Also adds fetchRoutes(), hostLoopback and UDP to "Add a network", and the OPFS data disk to "Add disks".

Checked

The host commands, snapshot (save, restore, attach()) and fetchRoutes() examples were run under Node against the current bundle and give the results shown in their comments. The VA-API, camera and microphone sections are browser-only and were written from the code and .agents/va.md, not run.

Not documented

serveWasiPrograms() (WASI programs on the host's engine) is left out, because the code calls it a prototype.

🤖 Generated with AI assistant

pi0 added 2 commits November 30, 2026 10:18
…es, UDP, the microphone and the camera in the SDK docs and README, and list the newer devices and uses in the README's introduction
@pi0
pi0 merged commit 6234100 into main Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants