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
d80c033106
net: drop the default Wisp server from the SDK
...
The SDK named the project's Wisp server (DEFAULT_WISP_SERVERS), and the
Node entry sent Origin: http://localhost to pass that server's allow
list (NODE_WISP_HEADERS). The server accepts only the page's origins,
so both are gone: wispBackend() takes the caller's server, and Node
sends handshake headers only when `headers` asks for them. The page
keeps wss://wisp.unkernel.dev:6680/ as its own default (web/src/net.ts).
The live Wisp test takes its server from UNKERNEL_TEST_WISP.
2026-11-27 22:24:02 +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
0d4be496af
web: add llms.txt
2026-11-27 21:44:35 +00:00
Pooya Parsa
b9b962c3ca
web: link the docs for agents
2026-11-27 21:37:40 +00:00
Pooya Parsa
fd78ca9ad0
docs: serve cross-origin isolated, so the page's Docs window embeds them in every browser
2026-11-27 21:34:12 +00:00
Pooya Parsa
b803bdd0a5
web: add docs app
2026-11-27 21:23:34 +00:00
Pooya Parsa
e86777e0c5
web: drop the release copy: a release is always loaded from the mirror
...
A release build (and a dev server without a local build) downloads only
the release's page.json; the copy in web/kernel/release/ with its checks,
the GL and Vulkan downloads and KW_MIRROR=0 are gone. A release without
page.json is refused with what to do.
2026-11-27 16:20:33 +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
3b71fa5637
ci: publish assets as artifacts
2026-11-27 15:35:45 +00:00
Pooya Parsa
fd204d3130
web: add a Steam app to the Games folder: Valve's native aarch64 client (the Steam Frame's, unsupported elsewhere) as windows of the page through xwl.sh; steam.sh takes the client binary out of the package Valve's linuxarm64 manifest names (SHA-256 checked), makes the ~/.steam links, starts the client again after it updated itself or gave up on its first update, and runs the UI unpinned on fewer than three CPUs; the packages are what the client's binaries need; for games (x86) it puts a script in place of the FEX tool's emulator that leaves them to box64, and adds a compatibility tool that does the same (neither has run a game: box64 0.3.4's 32-bit mode lacks libc functions Steam's library needs)
2026-11-26 00:44:09 +00:00
Pooya Parsa
39cf306b5b
guest, web: show X apps' windows as windows of the page through xwayland-satellite: the Debian image carries Fedora 43's aarch64 build (glibc 2.34 at most; pinned from Koji, taken out of the RPM by tools/rpmfile.py) with libxcb-cursor0 and libfontconfig1 (4.3 MiB more erofs, the same 4 MiB boot prefetch), and wland 0.1.0-261125-0023837 on both sides, whose relay holds X display :1 (:0 is the KMS Xorg's) and starts satellite for the first X client on its scale-1 socket, so X apps that know no DPI come out the right size on HiDPI; Wayland shells get DISPLAY from the relay where Xwayland is installed, and the relay runs with the distro's PATH; the Xwayland wrapper adds -shm without libEGL (rootless Xwayland's glamor aborted in libepoxy); the launcher's xwl.sh runs satellite by default (the image's, else Fedora's RPM fetched once), on the scale-1 socket where there is one, so X11, XPaint and the D3D12 demos are rootless and Xfce alone stays rootful (XWL_ROOTFUL)
2026-11-26 00:16:39 +00:00
Pooya Parsa
235955c313
web: fetch VLC through the page's mirror: the daily build's index and packages from /ppa and the libraries from /ports first, then the upstreams over plain http (Launchpad's https answers half of the requests with 503), with the index checked against the PPA's pinned signing key (sqv); a bundle's file can name a CORS mirror, which getFiles() tries before Wisp
2026-11-25 15:30:46 +00:00
Pooya Parsa
46eb0c8314
web: pin only Terminal and Settings in the Dock by default, on desktops and phones (the launcher's groups, glmark2 and Galculator are no longer pinned); the static first paint's Dock has the two in that order
2026-11-25 15:03:29 +00:00
Pooya Parsa
3f7bb3849b
web: free the Mac's select all and Ctrl-A: on Apple devices the shortcut prefix is ⌘J (it was Ctrl-A and ⌘A), so ⌘A selects all and Ctrl-A always reaches the guest; Ctrl-C in a terminal there sends ^C also with text selected, and keys pressed with ⌘ in the Display window are released when ⌘ comes up (browsers send no keyup for them); elsewhere Ctrl-A in a text field of the page with text in it is select all
2026-11-25 14:28:57 +00:00
Pooya Parsa
9b4b9d0878
web: add Zed to the Tools folder: its own aarch64 build (1.29.3, 82 MiB, SHA-256 checked) fetched in the guest on first run and unpacked as zed.dev/install.sh does (GitHub sends no CORS headers; the page's mirror is asked first), started with --foreground on guest Vulkan, with Zed's own Open and Save As pickers in a new settings file (the guest has no desktop portal)
2026-11-25 14:11:34 +00:00
Pooya Parsa
c78039944a
web: add VLC and mpv to the Media folder: VLC 4 (VideoLAN's daily build with its libraries from Ubuntu, unpacked under ~/.apps/vlc; the page fetches the libraries as an app's bundle, many files at once, pushed in batches) and mpv set up for guest VA-API (--vo=dmabuf-wayland, video-sync=desync, the builtin scripts off)
2026-11-25 13:09:11 +00:00
Pooya Parsa
1f0648d812
va: guest VA-API on the browser's WebCodecs (kwva): a libva driver in the base's kw layer sends each picture over vsock to a VideoDecoder or VideoEncoder on the page (createKernel({ va }), on by default on Debian, ?va=0); it decodes VP9, H.264, AV1 and HEVC (HEVC not yet run in a browser), encodes VP9, reads pictures back as exact NV12, exports surfaces as dmabufs of virtio-gpu resources and draws a decoded VideoFrame into a BGRX surface on the GPU (mpv --hwdec=vaapi --vo=dmabuf-wayland: 1080p H.264 at 30 fps on an M4 Pro)
2026-11-25 13:09:05 +00:00
Pooya Parsa
f6d7a4ee18
web: fx (local model) runs fx with FX_PERMISSION_MODE=full-access (no questions before tool calls; the caller's mode stays) and leaves a thinking model's reasoning on (THINK=0 turns it off)
2026-11-24 22:08:35 +00:00
Pooya Parsa
48f4732df5
web: Ollama and fx (local model) offer the registry's quantized tags (Qwen3 0.6B and 1.7B the defaults, no fp16 entries) and the llama.cpp, Ollama and fx apps drop the hints that quantized models abort
2026-11-24 21:21:48 +00:00
Pooya Parsa
5a4ba76d79
js: export the page's Web Audio sink as createAudioOut() from unkernel/web ( #17 )
...
web/src/audio.ts becomes js/web/audio.ts. It creates no AudioContext
before the page has had a gesture, holds the latest 10 s of what plays
until then (a clip that has ended plays whole, a stream joins live), and
has state, onChange, muted, resume() and close() for a page's control.
test/audio.test.ts runs the worklet and the sink without a browser.
Closes #17
2026-11-24 20:41:32 +00:00
Pooya Parsa
0f4029e7ae
web: hide the Dock and darken the top bar while a window is maximized, and make the Dock a lower full-width bar in compact mode
2026-11-24 19:30:45 +00:00
Pooya Parsa
560dec5336
web: add a resource widget to the desktop, drop the meters' hover popover, and move the photo credit to the page's corner
2026-11-24 18:38:23 +00:00
Pooya Parsa
0da40f0a35
gl: let a WebGL error drop one call instead of putting the guest's context in error ( #27 )
...
virglrenderer builds with -Dcheck-gl-errors=false and patch 0019: a host GL error is logged and counted (stats.glErrors) and the context goes on; GL_OUT_OF_MEMORY stays fatal.
2026-11-24 18:12:50 +00:00
Pooya Parsa
b7479ee19b
web: give apt's status lines their own descriptor in install.sh, so that package scripts keep their stdout ( #26 )
2026-11-24 17:19:49 +00:00
Pooya Parsa
951bb8e5dd
kernel: let kwsnd periods go down to 2 ms, in a buffer of 10 ms or more ( #22 )
...
The shortest period and tick drop from 5 ms to 2 ms for programs that
ask for low latency. A buffer is 10 ms or more as before (two 5 ms
periods), and a late tick still hands over up to 15 ms' worth when ticks
are shorter than 5 ms, so a short period tolerates the same host stall.
Programs that leave the period to alsa-lib, plain aplay, OSS without
SETFRAGMENT and requests of 256 frames or more negotiate what they did;
snd_pcm_set_params() with a latency under 20 ms now gets four periods of
2.5 to 3.75 ms (measured on Node, 2026-11-24).
Co-authored-by: Adam Meghji <566793+adammeghji@users.noreply.github.com >
2026-11-24 16:25:03 +00:00
Pooya Parsa
e615c1a0bf
vk: flush only the mapped ranges a submit can touch and signal fences at submit when nothing is read back (Qwen2.5 0.5B decode overhead 1588 to 41 ms per token without GPU work), a 4 GiB device-only heap apart from the host-visible one (KWVK_HEAP_MB) and maxMemoryAllocationSize from WebGPU's limits, uniform and push-constant blocks WGSL cannot lay out repacked as vec4<u32> words so Firefox and Safari take ggml's rope shaders, division by a constant zero rewritten, validation with WebGPU's capabilities only, the adapter in the device name with the words Ollama reads as Metal, CUDA or ROCm spelled apart (KWVK_DEVICE_NAME); web: Ollama and fx (local model) ask which model (SmolLM2 with a tool template, Qwen2.5 1.5B, Llama 3.2 1B, Qwen3.5 0.8B added), TEMP and THINK options (fx at temperature 0, thinking off), a free-space check before a model download, the server restarted when GPU discovery times out
2026-11-24 14:09:09 +00:00
Pooya Parsa
096c5c559b
web: drop and paste from the host into the guest: files dropped on a Wayland app (wland's drag and drop bridge, its container answering for the WM's windows), on a terminal (into the shell's directory at its prompt, else their paths) or on the page go into the guest, HTML, images and files paste into Wayland apps, and files copied in an app can be downloaded (their paths stay off the host clipboard)
2026-11-24 12:14:34 +00:00
Pooya Parsa
b8952460a7
web: open the dock's group stacks on hover (after the pointer rests on a tile for 500 ms; a click opens and pins at once), as a glass panel with a notch at the tile
2026-11-24 11:38:50 +00:00
Pooya Parsa
4f932073de
web: Ollama and fx (local model) apps on guest Vulkan (Qwen2.5-Coder 0.5B by default, models fetched by curl into Ollama's store), llama.cpp writing without end, downloads from the page's mirror first (llama.cpp, Ollama, its registry, Ubuntu, Ladybird's apt, and claude, node, uv and opencode in the install shim), the Browsers, AI, Desktop, Graphics and Games folders in the default dock, Ladybird's Vulkan hint
2026-11-24 11:34:43 +00:00
Pooya Parsa
17781fa30a
vk: present Wayland windows without copying (wland 0.1.0-261124-3c987e5 external buffers: the ICD names each swapchain image to the compositor and the page resolves it from the WebGPU texture; readback stays the fallback and for X11), track descriptor writes that spill over bindings and read back only the ranges the GPU wrote (device-local and host-visible memory types only), take a read-only marking from a buffer's members in the translator; web: Vulkan in the resource monitor, no guest Vulkan where WebGPU has no adapter, llama.cpp and D3D12 (vkd3d) gears and triangle apps, the Agents folder renamed AI
2026-11-24 10:45:38 +00:00
Pooya Parsa
3538073b0f
Add guest Vulkan on the page's WebGPU (kwvk): a Vulkan 1.2 ICD in the base (vk/icd, libvulkan_kw.so under the stock loader) sends commands over vsock port 1018 to a renderer in the SDK (createKernel({ vk }), js/core/vk*.ts) that implements them on a GPUDevice, with SPIR-V translated to WGSL by naga as wasm (vk/naga); Wayland, X11 and headless presentation by readback; the page's Guest Vulkan option, Environment row and vkcube, vkmark and GTK tiles; checks in test/vk
2026-11-24 07:23:03 +00:00
Pooya Parsa
c08e97791c
Update wland to 0.1.0-261124-100fbf2 on both sides (the npm package and the Debian image's relay): wl_pointer.enter only after a leave, and wl_touch
2026-11-24 01:08:27 +00:00
Pooya Parsa
5ccec07252
web: add a Browsers folder to the launcher with Chromium (moved from Desktop), Firefox (Debian's firefox-esr) and Ladybird (alpha, from its own apt repository)
2026-11-24 00:11:25 +00:00
Pooya Parsa
ae6b37c655
web: improvements
2026-11-23 11:26:46 +00:00
Pooya Parsa
fda0adc839
Credit the GL renderer's and the page's upstreams, and ship their notices in THIRD-PARTY.md: in the npm package, the release assets and the page's /licenses.md
2026-11-23 11:06:46 +00:00
Pooya Parsa
7c5e67d479
web: suggest CPUs in Safari as in Chrome, and two on phones: with the code epoch polled by a plain load Safari runs parallel work 3.3-3.5x on 4 CPUs
2026-11-23 10:57:56 +00:00
Pooya Parsa
8f039c5b05
web: add /smp-probe.html, the SMP probes for an engine (threads, waits, atomics, compiles, GC, the kernel on 1 to 8 CPUs), and build it and /profile.html as pages
2026-11-23 09:01:43 +00:00
Pooya Parsa
b347874391
web: rewrite the page as a desktop
2026-11-22 23:19:14 +00:00
Pooya Parsa
47a0202a64
guest, js: one program for the guest tools, and a Debian boot read from the image's front: kwbox (/usr/bin/kwbox, guest/src/kwbox.c) links kwtty, kw9p, kwvsock, kwshm, kwwasi, kwcmd and vtest-bridge into one static binary, called as kwbox tty|9p|vsock|shm|wasi|cmd|vtest (the per-tool paths are gone but binfmt's interpreter /usr/lib/kw/kwwasi; any other name it is called by is a host command, and kwbox is a reserved command name); /init sends an image or upper whose init still runs /usr/bin/kwtty to the base shell or safe mode; the traced boot that lays out an image is the page's (kwshm, kw.gl=1 kw.wayland=1), so wlandr is in Debian's boot set; HttpBase's background tier waits for the first read of the image before its quiet second (an image opened while its kernel loads fetched it during the boot)
2026-11-22 16:11:20 +00:00
Pooya Parsa
827dfa04d8
web: WebSockets in the guest preview: the service worker puts the shim /vm-ws.js into the HTML documents it relays, whose WebSocket reaches the guest (ws://localhost:<port>, /vm/<id>/<port>/, root-relative paths) through the page over a BroadcastChannel, where websocketOver() (js/core/ws.ts, RFC 6455 over vm.connect()) runs it, with credits, a socket cap and Web Locks for teardown; a preview document's root-relative requests are relayed to its port, so a Vite dev server's client and HMR work
2026-11-22 15:22:51 +00:00
Pooya Parsa
2abdc598e2
guest, kernel: boot faster and carry less in the base: /init looks for the data disk and the distro image on kwblk's disks only (wd*) and the kernel has no RAM disks (CONFIG_BLK_DEV_RAM off: probing brd's 16 took about 130 ms a boot); /init and rc read files with the shell instead of head; DHCP runs in the background (net background, net wait: the console's shell starts before the lease, kwtty serve and Debian's services with start links wait for it); the bundle stores the initrd uncompressed; wlandr moves from the base to the Debian image (wland says so where there is none); the checkout's CLI turns on Node's compile cache before it loads the SDK
2026-11-22 14:46:21 +00:00
Pooya Parsa
ef3486551a
gl: a new renderer after a lost WebGL context, and no renderer for 2D clients: after a loss the guest's next new GL context (or vtest client) builds a fresh renderer, so GL programs started after it work without a page reload (those running at the loss fail every command until restarted; vm.gl.status lost, losses, renewals); a dumb-buffer KMS client's context commands are held and answered without loading the renderer, and reach it before the first command that needs GL; checks for display resize, multisampling, context loss and Chromium's GPU path
2026-11-22 12:17:33 +00:00
Pooya Parsa
c04c59b67b
js, web: a display size change reaches the guest's DRM mode: updateDisplaySize() on a running machine (inline and worker mode) raises virtio-gpu's display event when the fitted size differs from what the driver read, so the guest gets a hotplug with the new preferred mode (64 to 4095 a side, the EDID's pixel clock kept); the page calls it 300 ms after the stage's size last changed; X has no udev to hear the hotplug, so the X demo follows it with xrandr
2026-11-22 12:17:33 +00:00
Pooya Parsa
0c1a561c15
web: the Wayland launcher tiles run their apps plainly (foot, es2gears_wayland): the relay runs from boot and every shell has the session
2026-11-22 11:08:04 +00:00
Pooya Parsa
659ed2685f
web, guest: wland 0.1.0-261122-632f589 (the page's package and the base's relay): its relay has --link-on-demand, so the page's guests start it at boot and GUI apps need no wland prefix, and its core sends seat events to every pointer and keyboard of a client, so Firefox takes input; wland is exempt from pnpm's minimum release age
2026-11-22 10:58:32 +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
d4c9b459f7
js, web: default memory 2 GiB on desktops and Node and 512 MiB on phones, fallback sizes from 1024, 2 and 4 GiB on the page's slider, and a sparse copy of a snapshot on its way to a worker
2026-11-22 09:48:43 +00:00
Pooya Parsa
bcaa48d1d4
web: a Wayland desktop: unmodified Wayland apps in the guest show as windows in the page through wland (npm wland, its relay /usr/lib/kw/wlandr pinned in the base): the page listens on vsock port 1023 and loads wland on the relay's first connection, client buffers are read in place through kwshm, GL clients' dmabufs are shown by virtio-gpu resource without readback (--dmabuf virtgpu, vm.gl.gpu.image()), and the clipboard is bridged; the guest's wland CMD starts the relay and sets the Wayland session (XDG_SESSION_TYPE and the toolkit variables, /etc/profile.d/kw-wayland.sh; Debian's chromium through /etc/chromium.d), and with a relay that has --link-on-demand the page's kw.wayland=1 starts it at boot, so GUI apps need no prefix; launcher tiles foot and GL windows, test/wland/page-check.mjs
2026-11-22 09:39:13 +00:00
Pooya Parsa
40ca8f287d
web: launcher demos for guest GL on Debian: kmscube, glmark2 (glmark2-es2-drm) and X with glamor (start.sh: Xorg on /dev/dri with kw-kms.conf, then glxgears or another client)
2026-11-21 23:32:28 +00:00