LayerFS-unkernel gives a browser-hosted Linux guest versioned, writable Workspaces. A Bash session starts in a Workspace mount and uses ordinary filesystem calls. LayerFS serves those calls from the browser, where it keeps each Workspace's changes and its committed history on disk.
Status: Current general guide. The browser prototype was tested on
unk/layerfs m34. This checkout contains the original spike, the stage 1 plan, and the documentation for the prototype.
| Milestone | What it established | Result or state |
|---|---|---|
| M0 | Ran the complete ARM64 LayerFS daemon inside unkernel and profiled the cost of emulation. | 10.5× Docker ARM64 on the spike workload |
| M1 | Measured the guest FUSE relay hop and compared browser worker placements. | Hop measured. The co-located native relay comparison reached 2.73×. |
| M2 | Served the guest through the relay from a native LayerFS daemon outside the guest. | 2.74× Docker ARM64 |
| M3+4 | Ran the LayerFS server as wasm in Chrome, with the local Store and Workspace overlays in OPFS. | 1.89× Docker ARM64 on the nine file phases |
| M5 | Shared Store through a remote gateway, with committed content cached in OPFS. | Planned |
The ratios come from separate campaigns, each with its own Docker baseline. Methods and findings
One browser tab runs one unkernel Linux guest. Bash, Git, and other ARM64 programs run inside that guest. The guest kernel uses its existing FUSE client. A small in-guest relay forwards requests to LayerFS, which runs as a WebAssembly module in Chrome.
Browser tab
|
+-- Dedicated kernel worker
| |
| +-- unkernel Linux guest
| | Bash / Git / builds -> Linux FUSE -> /dev/fuse -> relay
| | |
| +-- LayerFS wasm entry point <--------- LFR1 over vsock--+
| |
| shared-memory rings
| |
+-- LayerFS wasm workers
FUSE server, Workspace overlay, Store, Commit
|
WASI shim
|
Browser OPFS: one SQLite overlay per Workspace + one local SQLite Store
Multiple terminals can share one mount and see each other's changes. Separate Workspaces keep separate uncommitted edits, even when they start from the same version. The browser calls LayerFS to mount, commit, or unmount a Workspace. Architecture and Workspace lifecycle
The original spike ran the complete ARM64 LayerFS daemon inside the
guest. SQLite queries, content decoding, and Commit construction all paid
the cost of ARM64 emulation. M2 moved the FUSE server outside the guest
and proved the relay against a native Linux daemon. M3+4 moved that server
into Chrome as wasm32-wasip1-threads and put the local Store and overlays
in OPFS. Bash and the guest kernel's FUSE client stayed in place.
Original spike ·
Stage 1 plan
M3+4 passed its 3.0× file-speed gate. Its separate Commit ratio was 2.26×. The Chrome tests also recovered uncommitted edits after reload, copied and walked a 4,229-file project, ran Git status, committed an edit, and wrote a 4 GiB file to OPFS with LayerFS wasm memory staying at 45.75 MiB throughout the write. Benchmarks, RSS breakdown, and test coverage
In the matched project test, one idle LayerFS mount added about 206 MiB of renderer RSS compared with guest ext4. The two paths had overlapping workload peaks, and LayerFS's own wasm linear memory peaked at about 77 MiB, including Commit. A pressure test returned the expected EIOs and continued serving reads, then timed out during unmount. Two follow-ups detached cleanly. Concurrent builds across distinct Workspaces still need browser qualification. Measurement details and open checks
A separate browser experiment checked all 25 LayerFS workspace members
in 153.3 s after a one-line CLI edit with a seeded Cargo target. The
renderer peaked at 2.89 GiB RSS, and LayerFS wasm linear memory peaked
at 108.3 MiB. LayerFS committed the edit, and the guest read it back.
The subsequent bind unmount reported target is busy.
Whole-workspace Cargo experiment
- Architecture explains the read path, Commit, reload recovery, and how multiple shells use Workspaces.
- Benchmarks and findings gives the test matrix, exact source pins, and evidence locations.
- M5 is the planned remote Store gateway and OPFS cache for committed content.
- Original spike harness documents the experiment that this checkout can reproduce.
The LayerFS source is available under the MIT license.