19 Commits

Author SHA1 Message Date
Pooya Parsa
d8e442a641 Keep the page's data disk in OPFS in worker mode: OpfsDisk (8 MiB extent files), the SDK's backend option for the data disk, a one-way migration from IndexedDB, a storage quota block and a free Disk size in Settings, and a question in a second tab instead of an in-memory copy 2026-11-29 17:37:06 +00:00
Pooya Parsa
d382f7fa9b js: add a pure-JS Tailscale network device (work in progress)
The guest joins a tailnet from Node or the page: ts2021 control over
WebSocket, DERP relays, WireGuard and the packet filter in JS, loaded as
a separate chunk only when the option is used. SDK net option, CLI
--tailscale* flags and a page panel. Relay only; exit nodes, IPv6 and
real peer traffic are not covered yet.
2026-11-28 22:06:18 +00:00
Pooya Parsa
287e41464f net: document Wisp's limits, add a lookup option, move to wisp.unkernel.dev
The README and the SDK docs now say what a guest sees over Wisp: no
half-close (a client that waits for the server to see end of file
hangs), placeholder addresses for every name, no connect
acknowledgement. wispBackend() takes a `lookup` resolver for real
addresses, and its fake address table now evicts the least recently
used name instead of wrapping. The default server is
wss://wisp.unkernel.dev:6680/.

The live Wisp test waited for its marker anywhere in the screen, so the
shell's echo of the command satisfied it; it now waits for the marker at
the start of a line.

Refs #44
2026-11-27 22:15:52 +00:00
Pooya Parsa
08af7d9fe2 web: load the kernels, renderers and distro images from the release mirror
A page build with a release that carries page.json downloads only that
and points the page at mirror.unkernel.dev's copy of the release assets
(CORS, Range, immutable); nothing is copied into the output. The release
workflow now also publishes a gzipped copy of every .wasm, which the SDK
gunzips when a body starts with gzip's magic (the mirror sends files as
they are).
2026-11-27 16:10:47 +00:00
Pooya Parsa
b347874391 web: rewrite the page as a desktop 2026-11-22 23:19:14 +00:00
Pooya Parsa
349572cfaa web: build the page against a local wland package (KW_WLAND_PKG, into web/.wland-local/output; page-check --output runs against it) without touching node_modules, and an opt-in Firefox case for the Wayland check (page-check --firefox, debian-disk --firefox): firefox-esr takes pointer and keyboard input once wland sends seat events to every pointer and keyboard a client created 2026-11-22 10:16:55 +00:00
Pooya Parsa
ea9ddc296f web: offer guest GL (?gl=1, Options, Debian only): the page serves the renderer, passes kw.gl=1 so that the guest's shells use virgl (profile.d/kw-gl.sh), and names the WebGL2 renderer in the Environment tab, warning of a software one; release.yml attaches virgl.mjs and virgl.wasm 2026-11-21 18:12:27 +00:00
Pooya Parsa
d68d1ee181 web: save the session and pause the machine when the tab is hidden, and go on in place if the page lived; offer Pause after a cancelled close; suspend and resume without questions, quietly, with terminal windows reattached, a centred card and the state in the tab title 2026-11-20 12:04:45 +00:00
Pooya Parsa
1fcc7e6447 Run the distro images as a default user (user, 1000:1000) with passwordless sudo, load the kw profile in every interactive shell, and move ~/README from the page into the images
Sessions and the console run as user in /home/user on Debian and Alpine (doas with a sudo shim there); the host asks for another user with SpawnOptions.user, the CLI's --user or kw.user=. The shims, the command-not-found installers, poweroff and the page's launcher and demos reach root through sudo, and apt, apt-get and apk typed by the user are aliases to it. /usr/lib/kw/shrc gives nested shells, sudo -s and sudo -i the prompt, the command-not-found handler and PATH that only login shells had. The framebuffer, input and sound devices are group-accessible, and host mounts show as the user's.
2026-11-19 20:11:42 +00:00
Pooya Parsa
d91e188b06 web: add open and xdg-open in the guest, which open a URL in the preview or a new tab after a confirm 2026-11-19 18:30:20 +00:00
Pooya Parsa
7de755a631 web: keep the options in localStorage instead of the URL, and drop ?demo= 2026-11-19 17:42:00 +00:00
Pooya Parsa
97ec5e55c5 web: boot in a worker on the suggested CPUs by default, and add /profile.html
Worker mode is the default where the page is cross-origin isolated; a default worker that does not start reloads once on the page's thread. The CPUs default to the suggested count: half the threads, at most 4 on desktops and 2 in Firefox, one on phones and in WebKit (Safari ran parallel work slower with every CPU). The CPUs slider goes up to the device's threads and turns red past the suggestion. /profile.html boots each configuration, times everyday guest work and frame gaps, and checks the browser's own threads.
2026-11-19 16:36:29 +00:00
Pooya Parsa
9f6353b7b6 web: drop the fx stand-ins and the libfx demo, rename ?smp= to ?cpus=, and refresh the demos 2026-11-19 16:04:23 +00:00
Pooya Parsa
a06ccb6a49 web: fetch the kernel and distro images at build time, default to Debian
?distro= picks an image (or none, the base shell); images are served with
Range and content-addressed names. The Doom demo's fbdoom build and patches
move under web/. Reset of the data disk survives a reload.
2026-11-19 14:46:14 +00:00
Pooya Parsa
783c48c76e Switch the guest CPU to AArch64
User space is now unmodified aarch64 Linux ELF. kwemu gets an A64
interpreter (src/a64): integer, scalar and vector floating point,
AdvSIMD, exclusives and load-acquire/store-release, the EL0 system
registers, AES, PMULL, SHA1, SHA256 and CRC32. The kernel runs arm64
user space (signal frames, HWCAP, ptrace regsets, the arm64 syscall ABI),
and the guest image, the bundle, kwtest and the page's texts are built
for aarch64.
2026-11-19 00:12:38 +00:00
Pooya Parsa
21fc21c81a web: boot on several CPUs with the CPUs option (?smp=N)
Off by default: one CPU loads the UP bundle as before. With several the
page loads the SMP bundle (only then) and boots it in worker mode. The
choices are disabled with the reason where the page cannot (no SMP
kernel in the bundle, no cross-origin isolation, no Atomics.waitAsync),
and a failed SMP download or start reloads once on one CPU. Suspend is
hidden with several CPUs; a suspended session is offered to resume on
one CPU.
2026-11-17 11:26:48 +00:00
Pooya Parsa
e13e193bb8 guest: leave kwtest and kwbench out of release bundles
alpine.sh always writes alpine-test.cpio: the image followed by a second
cpio archive with kwtest and kwbench, which the kernel unpacks after the
first. alpine.cpio, which build.sh bundles, is the same, or with
KW_RELEASE=1 the image alone. The choice is in alpine.sh because build.sh
is part of the release workflow's cache keys.

The release workflow sets KW_RELEASE=1, so the GitHub release bundle, the
npm package and the deployed page have no test programs. Its kwtest steps
boot the release bundle's kernel with --initrd alpine-test. wasi-node.ts
uses alpine-test.cpio, and the headless lowmem scenario boots to the
shell instead of running kwtest, since the built page runs a release
kernel.
2026-11-16 12:24:42 +00:00
Pooya Parsa
3fd7021dc9 web: add fx, the coding agent, in a side panel working on the VM
The status line's fx button (or Ctrl-A f, or ?fx at load) runs libfx's
wasm fx terminal in a panel docked right of the stage, over it on narrow
screens. Its shell tool runs each command in the guest through
vm.exec(). The sign-in, settings and history stay in module memory only.
vercel.com sends its OAuth discovery document without CORS headers, so
fx's fetch falls back to a copy of the fields it reads. The launcher's
fx demo (the x86_64 binary under qemu) is hidden.
2026-11-16 00:35:12 +00:00
Pooya Parsa
26d08730cc Initial commit 2026-11-15 23:27:04 +00:00