AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
Waffle is a WebAssembly runtime for programs that run and work together in the browser.
Developer toolsTypeScript · RustGitHub @ShaulLavoOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
A WebAssembly runtime that lets programs run and work together in a browser tab
Taken from the repository README
Loading the full README.
Read the full README ↗A page creates one runtime. Programs borrow its filesystem, processes, pipes and network instead of each bringing their own. Bash Web and our browser build of Bun run on it.
import { createRuntime } from "waffle";
const runtime = createRuntime({ filesystem: { workerURL: "/fs-worker.js", mode: "memory" } });
try {
await runtime.filesystem.writeFile("/hello.txt", "hello from Waffle");
console.log(new TextDecoder().decode(await runtime.filesystem.readFile("/hello.txt")));
} finally {
await runtime.dispose();
}
hello from Waffle
That is the browser console of a cross-origin isolated page. Getting started builds and serves it step by step.
Atomics.wait on shared memory while the page and other workers serve it, so Preview 1 semantics hold.bun run size enforces the core budget.flush() to wait for IndexedDB. Storage says exactly what survives a closed tab.The page owns every service. Guests only borrow them, and they never create a second runtime.
Waffle is a library for a browser app, so there is no CLI. Install it with Bun, because Waffle's prepare step runs bun prepare.ts. Nothing is published to npm, so the command pins an exact commit and trusts Waffle's build step:
bun add github:ShaulLavo/waffle#4b9b6c668a59bd5aa52f0b87c3d76090b03706c3 --trust
Then:
fs-worker.ts (import "waffle/browser/fs-worker";) and the example above as app.ts.bun build ./app.ts ./fs-worker.ts --outdir ./public --target browser --splitting.public/ with the Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp headers, then open the page and its console. The runtime needs SharedArrayBuffer, which browsers give only to cross-origin isolated pages.Getting started has the HTML file, a short Bun server that sets the headers, and the failure you see without them. These steps were run with Bun 1.4.4, the version CI uses.
The page calls createRuntime() once. The runtime starts a filesystem worker that owns the file tree in shared memory. Each process runs in its own worker and reads and writes that shared memory directly. The page-side supervisor tracks pids, jobs and signals, and loads on the first spawn. Pipes and TCP sockets are rings in shared buffers. Concepts walks through the ownership rules and the life of a spawn.
Getting started · Guides · Concepts · Reference · Status and limits · Troubleshooting · ADRs · Development · Landing site
Pre-1.0 and experimental. package.json says 0.0.89 and private: true. There are no tags or releases and nothing on npm, so consumers pin a commit. Waffle promises no compatibility with older revisions.
mode: "safe" throws UNSUPPORTED_VFS.Status and limits has the full list and the numbers.
MIT. Adapted upstream code is listed in docs/bun-patches.md and its licenses are in LICENSES/. To change the code, start with Development and AGENTS.md. Report security issues through SECURITY.md.