Commit Graph

17 Commits

Author SHA1 Message Date
pi0x
b0c00d3619 ci: publish to npm only from pithings/unkernel (#64) 2026-11-28 21:08:01 +01: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
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
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
ff792f6121 gl: guest GL in unkernel behind createKernel({ gl }): the SDK loads the wasm renderer from dist (virgl.mjs, virgl.wasm), listens on vsock port 1019 and starts the vtest forwarder shipped in the base's kw layer; a prepared Debian disk and an end-to-end check in headless Chromium (eglinfo, frame checksums, glmark2 against llvmpipe) 2026-11-21 17:38:25 +00:00
Pooya Parsa
76191cee95 ci: write the GitHub release notes as a compare link from the previous tag 2026-11-19 18:08:34 +00:00
Pooya Parsa
2ce4c972ef guest: build the Alpine image from stock packages, without the kwemu rebuild 2026-11-19 17:07:49 +00:00
Pooya Parsa
0e0dbfa312 docs, ci: the distroless bundle, distro images and their release assets 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
20f9de7add kernel: build abitest into the test archive, and complete the build path's checks
alpine.sh builds kernel/guest/abitest.c (freestanding) beside kwtest and
kwbench, and the release workflow runs it on the UP kernel and on 2 CPUs.
Its SA_RESTART check waits for the parent's alarm with a sleep instead of
a busy loop, which the JIT finished before the alarm.

setup.sh checks xz and sha512sum (the package rebuild's toolchain and
source sums) and reports qemu-aarch64 (optional, zig build test's
comparison). build.sh's disk check also covers alpine-opt.sh, kw-path.sh
and the bwrap shim, which alpine-disk.sh now installs like the initramfs.
2026-11-19 00:12:48 +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
0e1cd96b77 Build the SMP kernel and the bundle's SMP patch with kernel/build.sh
kernel/build.sh smp builds the SMP kernel (kw_defconfig + kw_smp.config,
kwemu with atomics) from the same tree into vendor/build/kernel-smp; all
builds both kernels, and every bundle refresh adds the UP-to-SMP patch
when the SMP kernel is the same build of the tree (KW_SMP=1 requires it,
KW_SMP=0 leaves it out). kernel stays the UP-only quick loop. The patch is
cached in kernel-smp/up.kwpatch. Fixed build stamps (user, host, a build
id hashed from the tree and kwemu sources, the tree's newest commit date)
make kernels and patch reproducible while every other build keeps its own
banner for snapshot matching. Configs are checked against their fragments
after a reconfigure. KW_BUILD, KOUT_SMP, KWEMU_SMP and LINUX_REPO make the
script runnable against another tree and output root.

bundle.mjs --smp refuses two kernels that are not the UP and SMP builds
of one tree (banner, KW_ABI_VERSION, wasm_cpu_start, memory type), with
--smp-optional to warn instead and --smp-patch to reuse a cached patch.
The release workflow builds both kernels, runs kwtest on 2 CPUs and the
kernel patch tests (unexercised).
2026-11-17 13:23:55 +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
447d26f29d guest: rebuild busybox, zlib, openssl and apk-tools for kwemu
kernel/guest/alpine-opt.sh builds them from Alpine's own source,
patches and configuration (the aports commits the image's packages came
from), with gcc 16 at -O2 for rv64gc + Zba/Zbb/Zbs/Zicond, linked with
lld, against a sysroot of Alpine's packages (the image's musl). alpine.sh
and alpine-disk.sh swap the six files into the images.

Measured in the guest: shell scripts about 20% faster, exec 24%, apk
with both indexes 11%, sha1/sha512/chacha20 22-30%
(.agents/guest-packages.md).

The release workflow installs the host tools and caches the build output
under its own key; no existing cache key, path or hashed file changes.
setup.sh checks the new tools.
2026-11-16 11:50:47 +00:00
Pooya Parsa
26d08730cc Initial commit 2026-11-15 23:27:04 +00:00