neuron-explorer
Steering-first neuron explorer for Qwen3.5-4B: push every MLP neuron, keep every rollout, browse the results
formicarium runs unmodified x86-64 Linux command-line tools inside a web page.
Translation pending
Developer toolsTypeScript · RustGitHub @aletheia-worksOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Run unmodified x86-64 Linux CLI binaries in the browser and Node.js — the blink emulator on WebAssembly, no kernel to boot.
Taken from the repository README
Loading the full README.
Read the full README ↗Run unmodified x86-64 Linux command-line programs in the browser and in Node.js, without booting a kernel. formicarium wraps paludarium, a user-mode x86-64 Linux emulator compiled to WebAssembly (a Rust counterpart of jart/blink), and gives it a small JavaScript API: give it a static Linux executable and some files, run it, and get back the exit code, the output and the files it wrote. The goal is to let a CLI bug reproduction run as-is in a web page.
@aletheia-works/formicarium
on npm.formicarium is young (0.x) and its API may still change. What is checked on every change:
UnixStream::pair, rayon, Mutex/Condvar,
hard links, symlinks, flock) passes on Node.js, Chromium, Firefox and WebKit.It runs an interpreter (no JIT yet), so heavy programs are much slower than native. CI runs the browser probe, the install and command checks, the showcase acceptance and the showcase site's acceptance in real Safari on macOS; the other browser suites use Playwright's WebKit in its place. The browser probe and the install and command checks also run in Safari on iOS in an iOS 26 Simulator (not yet iOS 27, which safaridriver cannot drive); a real iPhone is not tested.
npm install @aletheia-works/formicarium
Node.js 24 or later is required.
import { createSession } from '@aletheia-works/formicarium/node';
import { decodeUtf8 } from '@aletheia-works/formicarium';
// guestBytes: a static ELF64 little-endian x86-64 Linux executable (Uint8Array).
const session = await createSession({ cwd: '/work', home: '/home/guest' });
try {
const result = await session.run({ guest: guestBytes, args: ['--version'] });
console.log(result.exitCode, decodeUtf8(result.stdout));
} finally {
await session.dispose();
}
Guests are not included. Build them as static musl executables, or install them from a catalog with the install API (below).
Import createSession from @aletheia-works/formicarium/browser. The page must
be able to use SharedArrayBuffer:
Cross-Origin-Opener-Policy: same-origin and
Cross-Origin-Embedder-Policy: require-corp (or use a service worker such as
coi-serviceworker on static hosting).runtime/web/package-worker.bundle.js) and the core
under assets/paludarium/ from your page's origin.script-src 'self' 'wasm-unsafe-eval'; worker-src 'self'; connect-src 'self'.
blob: is not needed.The embedding guide has a complete example.
Session holds a virtual filesystem between runs. Only the
working directory and the home directory persist; files sharing an inodeId
stay hard links, symlinks stay links, and modes are kept. Between runs use
listEntries, readFile, remove, setCwd and reset; dispose closes
the session for good.BUSY otherwise). A nonzero guest exit resolves normally
with the exit code and the raw stdout/stderr bytes; onOutput streams them
in order. Host, core, timeout (600000 ms by default, timeoutMs to change)
and cancellation (AbortSignal) failures reject with an ExecutionError
carrying a stable code and the partial output. When the run failed inside
the Worker, its cause chain names the original errors; it keeps the
messages that the JavaScript engine, WebAssembly or the core wrote, and only
the names of other errors, so caller data such as env values stays out. A
failed or cancelled run
leaves the filesystem as it was. For an interactive guest, stdin streams
its standard input and terminal: { columns, rows } makes its standard
streams a terminal; a run with stdin has no default timeout.network: { allow: ['github.com:443'] }. It can then open TCP connections
to the listed destinations only, and resolve only the listed names; anything
else fails with ENETUNREACH. TLS runs inside the guest, so give it CA
certificates. A browser has no TCP sockets, so a browser run also needs
network.relay: { url, protocols? }, a WebSocket relay such as
@aletheia-works/paludarium-wasm/relay serves; without one it fails with
UNSUPPORTED_ENV. Node.js uses the relay when given.assets/paludarium/build-info.json (ASSET_LOAD if missing or changed,
CORE_INIT if the core fails to start). Node.js loads the checked bytes from
a private directory. Browsers load the core from its URLs after the check, so
serve the assets from an origin you trust.validateGuest checks a guest's bytes and build
information, createInstaller installs tools from a fixed catalog of
checksummed ELF or tar.gz downloads, registers a
checked guest you already hold, and runs one
command line (, , , , , , , or an installed
tool) without a shell. A registered tool runs by name in a command session,
and every guest run finds it as . Installing with
writes no output, so a page can have tools ready before the
user types anything. See the
and .The runtime splits into the public API, a per-run Worker, guest input/output
and one module, runtime/core.ts, that knows the emulator core. The core
itself is the @aletheia-works/paludarium-wasm npm package, pinned to an exact
version and shipped in assets/paludarium/. See the
runtime architecture
and the architecture decisions.
See CONTRIBUTING.md for setup, builds, tests and pull requests, and follow the Code of Conduct. Report vulnerabilities privately as described in the security policy.
Apache License 2.0. The bundled paludarium core is also Apache-2.0; see
THIRD_PARTY_NOTICES.md and the
core license.
registerValidatedGuestcreateCommandSessionlscatcdrm -rfcpmvinstall <tool>/usr/bin/<tool>createInstaller