About
Resources
Blog
Docs
Source
Status
Social
Discord
IRC
Bluesky
X/Twitter
Contact
team@tangled.org
security@tangled.org
Legal
Terms of Service
Privacy Policy
Sign in
Join now
unkernel
tsiry-sandratraina.com
/
Star
Starred
Star
1
Something went wrong. Try again.
Fork
0
Eye filled
Watch
Watching
Watch
An experimental port of NetBSD, FreeBSD, OpenBSD, and XNU to unkernel
unkernel.dev
unkernel
linux
freebsd
netbsd
wasm
+5 more
unkernel
linux
freebsd
netbsd
wasm
Star
Starred
Star
1
Something went wrong. Try again.
Fork
0
Eye filled
Watch
Watching
Watch
Overview
Overview
Issues
Issues
Pulls
Pulls
Pipelines
Pipelines
unkernel
/
js
/
core
1 folder
·
74 files
at
native/wasmtime-host
tsiry-sandratraina.com
·
js: serve DNS over TCP on the stack's port 53
·
20h ago
37003403
tailscale
js: run the Tailscale guest address scripts as root, so tailscale0 is set up on the distro images
1d ago
9p.ts
js: keep 9p fids consistent across removes and renames
2d ago
block.ts
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
22h ago
bluetooth-gatt.ts
Add guest Bluetooth on Web Bluetooth: kwbt (an HCI transport, hci0 while a controller is attached), the SDK's bluetooth option and vm.bluetooth with an emulated LE controller, Bluetooth and Serial ports sections in the page's Settings with Terminal buttons, and the Bluetooth and Serial Monitor launcher apps
1d ago
bluetooth-le.ts
Add guest Bluetooth on Web Bluetooth: kwbt (an HCI transport, hci0 while a controller is attached), the SDK's bluetooth option and vm.bluetooth with an emulated LE controller, Bluetooth and Serial ports sections in the page's Settings with Terminal buttons, and the Bluetooth and Serial Monitor launcher apps
1d ago
bluetooth.ts
Add guest Bluetooth on Web Bluetooth: kwbt (an HCI transport, hci0 while a controller is attached), the SDK's bluetooth option and vm.bluetooth with an emulated LE controller, Bluetooth and Serial ports sections in the page's Settings with Terminal buttons, and the Bluetooth and Serial Monitor launcher apps
1d ago
camera-chunks.ts
Add a guest microphone and camera: kwsnd capture, kwcam (V4L2, raw and host-encoded H.264), and camera frames named to the kwva encoder
1d ago
camera-h264.ts
Add a guest microphone and camera: kwsnd capture, kwcam (V4L2, raw and host-encoded H.264), and camera frames named to the kwva encoder
1d ago
camera-pixels.ts
Add a guest microphone and camera: kwsnd capture, kwcam (V4L2, raw and host-encoded H.264), and camera frames named to the kwva encoder
1d ago
camera.ts
Add a guest microphone and camera: kwsnd capture, kwcam (V4L2, raw and host-encoded H.264), and camera frames named to the kwva encoder
1d ago
commands.ts
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)
1w ago
console-ring.ts
Park, snapshot and resume the SMP kernel: a rendezvous of every CPU at the consistent point, a restore that starts the other CPUs again and restarts each idle task, the CPU count in the snapshot, and Suspend on the page with several CPUs
1w ago
console.ts
js: recognise the distros' ⇒ prompt in the console router (#68)
1d ago
cpu.ts
js: unwind the JSPI stack of an exited task and of one started afresh (a move to another CPU, a park cycle) instead of parking it for good: the suspended import throws STACK_DROPPED, so the engine frees the stack at once rather than at a garbage collection, which Firefox's limit of about 2000 stacks per thread did not wait for ("too many continuation stacks" after a while of kmscube on 2 CPUs)
1w ago
devices.ts
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
22h ago
display.ts
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
1w ago
distro.ts
Fetch a distro image's warm set only once the guest reads in it, and leave apt's srcpkgcache.bin out of Debian's
1d ago
fs.ts
js: hard links on host file systems (Fs.link, 9p Tlink) (#46)
2d ago
gl-gpu.ts
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)
5d ago
gl-stream.ts
gl: load the renderer on the guest's first GL use (the device advertises virgl's capsets from fixed sizes; gl.eager, ?glload=eager load before boot) and turn guest GL on by default for Debian in the page, with the virtio-gpu device (?gpu=0: the vtest link only); the kw layer ships /etc/X11/kw-kms.conf (modesetting with glamor on /dev/dri/card0) and sets the vtest variables only without the device; virtio-gpu waits up to 30 s, killably, for a capset; a suspend while a program uses the GPU is refused at once with a message
1w ago
gl.ts
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)
1w ago
http.ts
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
1w ago
index.ts
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
22h ago
input.ts
Initial commit
2w ago
instance.ts
Add guest USB on WebUSB: kwusb (a USB host controller whose transfers the host serves, with usbfs and the FTDI, CP210x, CH341 and PL2303 serial drivers), the SDK's usb option and vm.usb with a fake test device, and a USB devices section in the page's Settings
23h ago
jit.ts
js: compile hot JIT modules with TurboFan per module
2d ago
kernel.ts
Add guest USB on WebUSB: kwusb (a USB host controller whose transfers the host serves, with usbfs and the FTDI, CP210x, CH341 and PL2303 serial drivers), the SDK's usb option and vm.usb with a fake test device, and a USB devices section in the page's Settings
23h ago
kpatch.ts
Describe the kernel patch tools as they are used
1w ago
kremap.ts
Ship the SMP kernel as a patch in the UP bundle (packaging prototype)
1w ago
kwsparse.ts
Initial commit
2w ago
load.ts
web: load the kernels, renderers and distro images from the release mirror
2d ago
memfs.ts
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
1w ago
mounts.ts
js: keep host file systems in worker-mode snapshots taken with commit (#62)
1d ago
net-fetch.ts
js: connect routed names on other ports through the inner backend (#66)
1d ago
net-tunnel.ts
js: add Tailscale exit nodes, and rework the page's Tailscale settings
1d ago
net-wisp.ts
js: carry the guest's UDP through the direct and Wisp backends (#47)
2d ago
net.ts
js: serve DNS over TCP on the stack's port 53
20h ago
opfs-disk.ts
Measure the OPFS data disk's extent files while it opens, so the page's attach line shows the bytes they hold instead of 0 KiB
21h ago
output.ts
js: log an error with its name and message where the engine's stack leaves them out (errorText): on Firefox and Safari a trap on another CPU was logged as its frames alone
1w ago
profile.ts
profile: take an executable segment's size in memory when naming an offset, so that separate debug files, whose segments are cut short in the file, give names
1w ago
serial.ts
Add guest serial ports on Web Serial: kwserial (/dev/ttyACM0..3), the SDK's serial option and vm.serial, Connect in the page's Settings and from a toast, and the Thonny and GTKTerm launcher apps
1d ago
shm.ts
js: in worker mode, read guest shm in place and stop waiting for the kernel's yield: where the kernel's memory is shared with the owner thread (an SMP kernel on the shared transport) ShmFile.readSync() and views() work there as inline (Shm.inPlace; the worker waits for the owner's pin before the guest frees an export's pages), and on one CPU shm reads and the owner's vsock packets to the guest go through rings in the shared control block, served at the kernel's next clock read (about 0.6 ms instead of up to 20 ms)
1w ago
snapshot.ts
Add guest USB on WebUSB: kwusb (a USB host controller whose transfers the host serves, with usbfs and the FTDI, CP210x, CH341 and PL2303 serial drivers), the SDK's usb option and vm.usb with a fake test device, and a USB devices section in the page's Settings
23h ago
sound-in-ring.ts
Add a guest microphone and camera: kwsnd capture, kwcam (V4L2, raw and host-encoded H.264), and camera frames named to the kwva encoder
1d ago
sound-ring.ts
js: send worker-mode sound through a shared PCM ring and reuse one MessageChannel for yields (#18, #19)
6d ago
sound.ts
Add a guest microphone and camera: kwsnd capture, kwcam (V4L2, raw and host-encoded H.264), and camera frames named to the kwva encoder
1d ago
support.ts
Initial commit
2w ago
tailscale-load.ts
js: add a pure-JS Tailscale network device (work in progress)
1d ago
tty.ts
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)
1w ago
usb-fake.ts
Add guest USB on WebUSB: kwusb (a USB host controller whose transfers the host serves, with usbfs and the FTDI, CP210x, CH341 and PL2303 serial drivers), the SDK's usb option and vm.usb with a fake test device, and a USB devices section in the page's Settings
23h ago
usb.ts
Add guest USB on WebUSB: kwusb (a USB host controller whose transfers the host serves, with usbfs and the FTDI, CP210x, CH341 and PL2303 serial drivers), the SDK's usb option and vm.usb with a fake test device, and a USB devices section in the page's Settings
23h ago
va-av1.ts
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)
5d ago
va-codec.ts
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)
5d ago
va-enc.ts
Add a guest microphone and camera: kwsnd capture, kwcam (V4L2, raw and host-encoded H.264), and camera frames named to the kwva encoder
1d ago
va-h264.ts
Add a guest microphone and camera: kwsnd capture, kwcam (V4L2, raw and host-encoded H.264), and camera frames named to the kwva encoder
1d ago
va-hevc.ts
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)
5d ago
va-vp9.ts
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)
5d ago
va.ts
Add a guest microphone and camera: kwsnd capture, kwcam (V4L2, raw and host-encoded H.264), and camera frames named to the kwva encoder
1d ago
virtio-gpu.ts
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
1w ago
virtio.ts
js: read and write virtqueue ring indices at their unmasked address on a shared memory (the & ~1 went negative for a ring at or above 2 GiB)
1w ago
vk-exec.ts
vk: fill the gaps games, mpv and Vulkan 1.2 callers hit (#32, #33) and add texel buffers: timeline semaphores are offered (values reached at the submit as fences are, a queue wait for a value nothing has signalled holds that submit and the later ones in the ICD until it is given), with imageless framebuffers, separate depth/stencil layouts, multiDrawIndirect, HOST_CACHED on the host-visible memory type, image_format_list and swapchain_mutable_format, and one more inter-stage location for wgpu-hal; the translator marks storage buffers a module never writes read-only, reflects only the resources an entry point reaches, drops OpLine, folds OpSpecConstantOp on integers, booleans and composites, lowers isinf/isnan and int[1] sample masks; the host sizes uniform bindings in 16-byte steps, copies block-compressed images in whole blocks and between size-compatible formats, binds placeholders for unwritten textures and samplers, takes storage bindings at unaligned offsets in dispatches through a scratch copy, rewrites indexed triangle fans as lists and no longer truncates sizes of 2 GiB and more; texel buffers (VkBufferView, both descriptor types) run as a storage buffer of words plus a per-view parameter block, decoded by the view's format in WGSL; the base profile exports LIBGL_KOPPER_DISABLE=1 so Mesa's zink stays off kwvk; mpv's gpu-next (yuv420p and rgb24), DDNet with its own SPIR-V and vkd3d's texel-buffer pipelines run; checks in test/vk (vk-timeline, vk-texel, host cases, translator shaders) and a games stage for the test disk
2d ago
vk-formats.ts
vk: fill the gaps games, mpv and Vulkan 1.2 callers hit (#32, #33) and add texel buffers: timeline semaphores are offered (values reached at the submit as fences are, a queue wait for a value nothing has signalled holds that submit and the later ones in the ICD until it is given), with imageless framebuffers, separate depth/stencil layouts, multiDrawIndirect, HOST_CACHED on the host-visible memory type, image_format_list and swapchain_mutable_format, and one more inter-stage location for wgpu-hal; the translator marks storage buffers a module never writes read-only, reflects only the resources an entry point reaches, drops OpLine, folds OpSpecConstantOp on integers, booleans and composites, lowers isinf/isnan and int[1] sample masks; the host sizes uniform bindings in 16-byte steps, copies block-compressed images in whole blocks and between size-compatible formats, binds placeholders for unwritten textures and samplers, takes storage bindings at unaligned offsets in dispatches through a scratch copy, rewrites indexed triangle fans as lists and no longer truncates sizes of 2 GiB and more; texel buffers (VkBufferView, both descriptor types) run as a storage buffer of words plus a per-view parameter block, decoded by the view's format in WGSL; the base profile exports LIBGL_KOPPER_DISABLE=1 so Mesa's zink stays off kwvk; mpv's gpu-next (yuv420p and rgb24), DDNet with its own SPIR-V and vkd3d's texel-buffer pipelines run; checks in test/vk (vk-timeline, vk-texel, host cases, translator shaders) and a games stage for the test disk
2d ago
vk-host.ts
vk: free the readback staging buffer when mapAsync fails (#65)
1d ago
vk-shader.ts
vk: fill the gaps games, mpv and Vulkan 1.2 callers hit (#32, #33) and add texel buffers: timeline semaphores are offered (values reached at the submit as fences are, a queue wait for a value nothing has signalled holds that submit and the later ones in the ICD until it is given), with imageless framebuffers, separate depth/stencil layouts, multiDrawIndirect, HOST_CACHED on the host-visible memory type, image_format_list and swapchain_mutable_format, and one more inter-stage location for wgpu-hal; the translator marks storage buffers a module never writes read-only, reflects only the resources an entry point reaches, drops OpLine, folds OpSpecConstantOp on integers, booleans and composites, lowers isinf/isnan and int[1] sample masks; the host sizes uniform bindings in 16-byte steps, copies block-compressed images in whole blocks and between size-compatible formats, binds placeholders for unwritten textures and samplers, takes storage bindings at unaligned offsets in dispatches through a scratch copy, rewrites indexed triangle fans as lists and no longer truncates sizes of 2 GiB and more; texel buffers (VkBufferView, both descriptor types) run as a storage buffer of words plus a per-view parameter block, decoded by the view's format in WGSL; the base profile exports LIBGL_KOPPER_DISABLE=1 so Mesa's zink stays off kwvk; mpv's gpu-next (yuv420p and rgb24), DDNet with its own SPIR-V and vkd3d's texel-buffer pipelines run; checks in test/vk (vk-timeline, vk-texel, host cases, translator shaders) and a games stage for the test disk
2d ago
vk.ts
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
6d ago
vsock.ts
js: keep host file systems in worker-mode snapshots taken with commit (#62)
1d ago
wasi-exec.ts
wasi: close preview 1 gaps: sockets, wasi-threads, guest clocks and CPU time, fd_allocate
3d ago
wasi-program.ts
wasi: close preview 1 gaps: sockets, wasi-threads, guest clocks and CPU time, fd_allocate
3d ago
wasi.ts
js: send worker-mode sound through a shared PCM ring and reuse one MessageChannel for yields (#18, #19)
6d ago
worker-devices.ts
Add a guest microphone and camera: kwsnd capture, kwcam (V4L2, raw and host-encoded H.264), and camera frames named to the kwva encoder
1d ago
worker-host.ts
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
22h ago
worker-protocol.ts
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
22h ago
worker-serve.ts
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
22h ago
worker-shared.ts
js: in worker mode on the shared transport, send vsock packets for the guest as one transferred message while the kernel waits idle, instead of copying them twice through the ring (a cold 26 MB read from a host mount: 125 to 102 ms); the worker counts delivered messages in VS_ACK so the stream keeps its order (#16)
5d ago
ws.ts
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
1w ago