Commit Graph

12 Commits

Author SHA1 Message Date
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
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
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
83c65c3cb4 web: take the Latest release for the page build, not the first one listed: GitHub sorts same-day tags by their hash 2026-11-19 23:09:45 +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
0deeb1b541 Bump the package to 0.2.0, the first release of the aarch64 guest 2026-11-19 00:12:56 +00:00
Pooya Parsa
82e3098460 web: refuse a release bundle built for another kwemu ABI
A page build takes the newest release's bundle. Until a release is cut
from this tree that is a riscv64 bundle (kwemu ABI 8), which does not fit
the aarch64 page. fetchKernel() now reads the kernel's kw_abi_version()
(kernelInfo() in bundle.mjs) and fails on a release whose number is not
include/kw_emu.h's; a local bundle only gets a warning.
2026-11-19 00:12:48 +00:00
Pooya Parsa
96598464f9 Build the CPU worker into the package and split the page's kernel
pnpm build inlines js/node/cpu-entry.ts where js/node/cpu.ts starts it,
in the Node entries and inside the inlined Node kernel worker (WORKERS
nested), so the package starts SMP CPUs without source files. The page
build serves web/kernel/page/: the bundle without its SMP patch section
(the same bytes when there is none) and, only with a patch, the SMP
bundle it makes as a second hashed asset (kernelSmpUrl, unused until the
page has CPU threads).
2026-11-17 10:44:16 +00:00
Pooya Parsa
cabc62f8f2 web: scope the service worker to /vm/ and drop the offline copy
The worker now answers only /vm/<id>/<port>[/...], the guest preview's
relay. The page and its assets load from the network: a cache-first page
stayed old whenever caching a new build failed. Root-relative requests
from a preview are no longer relayed; guest pages use relative URLs.

sw.ts calls registration.update() on every load and after an hour
hidden, since register() with an unchanged URL never looks for a new
script. The old scope-/ registration gets the new script on its next
navigation, deletes the kw-app-* caches and tells old pages an update is
ready; the next load unregisters it. The update indicator, the Offline
copy row and /kw-assets.json go with the offline copy.
2026-11-16 12:29:32 +00:00
Pooya Parsa
26d08730cc Initial commit 2026-11-15 23:27:04 +00:00