Ok, bit of a tongue twister, I guess. I needed a simple way to play with WebAssembly, and at work, every machine is so locked down I can't install the tools I need. So I built a Pascal to WebAssembly compiler that runs in the browser. Started as a silly weekend project, ended up being a silly months-long project. Which now sort of works!
There's some docs, tons of examples, links to a GitHub repo with more examples, tutorials, even some demoscene style stuff. I'm working on the documentation, I mean, it makes sense in MY head. Sometimes. Hopefully someone gets to have some fun with this. Core is built in Odin, because, oh yeah, Odin really does put the joy back in dev.
Complete slop but quite interesting conceptually. Tried to combine Docker with WASM.
The things it can run is very impressive, for example llama on webGPU running a bundled Qwen in pi agent. Everything compiled from source inside the browser, see the Dollyfiles, for example: https://slopshare.dev/v0.1.4/view/pi-local/
Pi-agent is running on a custom runtime based on QuickJS that hooks in to the in-memory filesystem that lives in the browser tab. Claude as well (an old version from npm). Codex compiled from source.
For HTTP it implements libcurl through the browser fetch.
Also quite hilarious to have a "backend kernel" in javascript so you can write the "frontend" in C.
I built XPRTIX (https://xprtix.com)—a browser-first media processing suite designed to handle video repair, image conversion, 3D mesh compression, and SVG editing 100% locally on the client.
Files never leave the user's machine. The entire suite relies on plain HTML, CSS, and ES modules (zero UI frameworks) to keep UI overhead as minimal as possible while offloading compute-heavy tasks to WebAssembly workers.
WASM Architecture & Technical Details:
Video Demuxing/Remuxing (FFmpeg WASM + Mediabunny):
- Primary pipeline uses WebCodecs and Mediabunny for fast local container manipulation.
- For unsupported containers or faststart bit-rewriting (e.g., relocating the moov atom to the front or retagging hev1 to hvc1 for iOS playback without re-encoding), it falls back to an optimized, lightweight FFmpeg WASM build running in a Web Worker.
2. Image Decoding (libheif WASM):
- Decodes iOS HEIC/HEIF containers locally using a compiled libheif WebAssembly module before processing canvas buffers for WebP, AVIF, PNG, or JPEG conversion.
3. 3D Mesh Compression (Draco & Meshopt WASM):
- Inspects GLB, glTF, OBJ, STL, and PLY geometry trees.
- Offloads heavy buffer quantization and vertex stream compression to Web Workers running Draco and Meshopt WebAssembly encoders to keep the main thread locked at 60 FPS.
Memory & Performance Lessons:
- Running heavy WASM binaries across multiple workers requires aggressive memory cleanup to prevent tab crashes on lower-tier mobile hardware or long sessions.
- Memory ArrayBuffers are allocated, processed, and explicitly terminated/garbage-collected per file job.
It is free with no accounts, paywalls, or watermarks.
I would love feedback from the community on WASM binary size optimization, worker thread pooling strategies, or memory management edge cases.
I've found it frustrating that there seems to be no reliable source comparing the performance of WebAssembly runtimes. So, i've been working on wasm.fyi which does just that.
Hopefully this comes in handy! If there's a particular .wasm corpora or runtime you'd like to see added, please let me know!
I built Submilli, it's a runtime for AI agents that write code instead of tool-calling, aka code-mode or programmatic tool calling. Built in Rust.
It has its own TypeScript checker, a bit more strict than tsc and without async/await, because mostly, the agent doesn't need them. The compiler generates a WasmGC binary, which we then run with a new interpreter, submilli-wasm: https://github.com/submilli/submilli-wasm.
The reason for a new interpreter instead of wasmtime or wasmi:
Wasmtime - The code the agent produces is one-time code, I don't need a JIT or optimization. The opposite, I need the compilation part to be fast.
Winch or Wasmi - Submilli uses WasmGC and other Wasm 3.0 features, which neither Winch nor Wasmi supports at the moment.
Submilli-wasm passes the Wasm 3.0 spec testsuite, has an API that is (almost) compatible with wasmtime, and supports async host functions. It compiles 8 to 20 times faster than wasmtime and about 2 times faster than wasmi.
I think Wasm has great advantages for these types of agentic use cases. One is the isolation and memory safety, as an alternative to microVMs or processes.
The second one, which I like a lot, is the fuel metering - we can cap the execution with fuel, which is much better than just a timeout. Most of the time, agent-generated code is going to block on IO anyway, which is almost free (only the memory).
Submilli supports most of ECMA-262, but not Node.js. It has its own standard library, which is tailored for agent use and implemented on the host side in Rust.
Submilli has support for custom packages that the agent can import and use (the operator needs to install them). Each package compiles to a Wasm module on its own, and the runtime links them through the linker. So I compile packages ahead of time and just link them when the LLM-generated code is ready.
The interpreter also checks permissions in real time, like whether an HTTP call or a file-system operation is allowed. The permission checks are per package, so each package defines what it is going to access. For example, while a Stripe package is allowed to call api.stripe.com, the model-generated code is not.
Amber Folio is an emulator for SSI's Gold Box RPGs (Pool of Radiance, 1988), written in C++ and compiled with Emscripten. A few things I learned getting it into a browser:
No SDL on the web. The desktop build uses SDL, but in a browser everything that matters (picking files, persistence, touch, the settings) is DOM work, so the page has a small JS host of its own around the same core. The core isn't a cut-down edition; it's the same code as the desktop build.
One thread. No SharedArrayBuffer, so no COOP/COEP headers, so it runs on an ordinary static page. Sound goes through an AudioWorklet fed from the main thread.
Size. About 250 KB of emulator to download.
Storage. The game the player supplies (a folder on desktop, files or a zip on a phone) goes into origin-private storage and IndexedDB, with saves kept apart from the game files. Nothing is uploaded; the files never leave the browser.
A CRT filter as a WebGL2 shader. The fiddly part was scale: an aperture-grille triad needs three device pixels to exist, so the mask detail follows the scale (none below 3×, one triad per pixel from 3×, two from 6×), measured per element in device pixels.
Reading the screen back. The core can return what's on screen as text by matching each 8x8 cell against the game's own font, read from its memory at call time. The site uses it for screen-reader support: the game's menus, lists and messages are read aloud, but not its pictures, so it isn't playable without sight.
We ship Hexana, a plugin for JetBrains IDEs that opens Wasm and native binaries in the editor. 0.21 is out. The Wasm-specific items are below. The rest of the release (hex diff details, native binary diff, Arrow format support) we will skip here.
1. WasmGC type graph in the WAT view
GC types in the WAT (virtualized) tab now carry two new layers.
Inline annotations: every type definition shows a kind badge and field-type labels inline.
Alt+click opens a popup: field names, types, supertypes, subtypes, byte offset.
Show Type Graph opens an interactive canvas:
Edges: subtype relationships and field references between types.
Default view: 1 subtype level, 1 field hop. Configurable up to 5 of each.
FUNC-typed field targets collapse into a "+N funcs" badge. Expand when you need them.
Expanding a node keeps everything else in place.
Double-click a node jumps back to that type's WAT row.
Wheel pans. Cmd/Ctrl+wheel zooms.
Tested at 294 nodes on kotlin/hello.wasm.
2. Scripting suites and SARIF for Wasm binaries
The scripting layer got three additions relevant to Wasm tooling pipelines.
hexana.defineCheck(id, fn): findings from a check function land in the Problems tab and in SARIF 2.1.0 output. Write a check once, get IDE integration and machine-readable output.
hexana.defineFlags(schema): typed per-run parameters. No more free-form globals for things like "which section to ignore".
*.test.js suites: declare artifact roles via hexana.artifact(role, {formats}). Use describe, test, beforeEach, afterEach with async. Deterministic seeded crypto (SHA-256 counter DRBG seeded from script and artifact content). ESM loader resolves bare specifiers from a suite-rooted node_modules.
run_script_suite runs suites from CLI or the MCP tool: human report or JUnit XML, exit 1 on failure. Fits into a CI step.
The IDE side: a Hexana Suite run configuration streams results into the test console as a tree. Failures navigate to source. Rerun Failed and Copy CLI Command work. Gutter run icons on test() and describe(). A "Run Suites for This Binary" context action on binary files.
3. Hex diff for Wasm files
Compare two .wasm files (or a VCS change) in the platform diff window: hex side by side, changed bytes highlighted, long unchanged runs collapsed, a section bar pairing sections by name. The Sections and Imports table tabs below show rows tinted added/removed/modified.
4. Extensionless Wasm files open fully
A Wasm module without a .wasm extension now opens in the full editor (WAT view, hex, all tabs) instead of falling back to a plain hex view. One shared provider factory serves the IDE, VS Code, and the browser app, so format drift between hosts is gone.
What does the WasmGC type graph look like on your modules? We tested at 294 nodes. Curious whether it holds up on larger hierarchies.
I'd like to introduce arm64js -- an ARMv8-A system emulator that runs in wasm (built in Rust) and can boot real Alpine Linux in a web browser. It's an interpreter that emulates a minimal hardware stack, so the VM thinks it's on real hardware and thus acts normal: runs apk, Docker, etc.
Since WebAssembly doesn't allow fetching data without CORS and sending TCP requests, apk and access to the internet work via small proxies: apk goes via a proxy that just adds CORS, TCP goes via a WebSocket <> TCP gateway.
One wasm module instantiated in a few web workers, all sharing one SharedArrayBuffer as the VM's "RAM".
There is also a JS SDK for other devs to create and serve their own VMs. It's free for non-commercial use.
Hi all, i've been playing with wasm for a while. Started by reimplementing murmurhash in wat around 10 years ago. Recently i've been building wlearn in my free time, a machine learning stack for browsers and node, with matching python implementation. Recent coding agents made it [feel] realistic. Just decided to share here in case someone finds it useful, has feedback or wants to collab.
The idea is to make tabular ML available in browsers (local training, private data)
Models: XGBoost, LightGBM, SVMs, random forests, GAMs, neural networks, symbolic regression and more
Preprocessing: imputation, scaling and categorical encoding
Composition: pipelines, ensembles and AutoML
Uncertainty: calibration and prediction intervals
Portable models: save fitted models and pipelines in a shared format with cross-language compatibility
Heavily relies on WebAssembly obviously. Preprocessing uses Tranfi. Neural models, symbolic regression use Polygrad. Those are two other wasm-based libraries i'm developing (i guess it's called ai psychosis nowadays)
A clean Release build containing Console.WriteLine(42) produces 84,513 bytes of final, uncompressed WASI Preview 2 component, including the runtime and precise garbage collector. This is a portable .wasm file that you can run with wasmtime.
Roslyn produces CIL; NetWasm compiles the reachable program into Wasm, specializes generics and links the runtime support it uses. The emitted application doesn’t carry CoreCLR or Mono.
Some architectural choices:
An independent, deliberately smaller .NET library profile.
No runtime type-name metadata, general reflection or dynamic.
Precise Boehm GC in linear memory, rather than WasmGC.
WIT imports/exports and WASI Preview 2 components, with core Wasm output also available.
Working features include generics, exceptions, virtual/interface dispatch, async/await, LINQ, JSON, XML, regex, HTTP and TUnit testing. It’s pre-1.0, and managed threading isn’t currently supported.
The playground compiles and runs entirely in the browser. The compiler tooling itself uses Microsoft’s .NET/Wasm toolchain, thus dotnet newdotnet builddotnet rundotnet test - yes it comes with TUnit with VSTest runner - dotnet publish all work as you're used to.
Hey guys, so no going in details but suppose (am using webasm with rust), someone open my website and in background it gets connected to a network of other people's browsers, and there any browser can recieve data which they can verify through merkles (let's just say they recieve data A from many other browsers and then recieve data B and after some hashing it check if both r equal and send to others if they request it), then is there any way for malicious users to tamper with their browser so that they can send wrong data or verify wrongly or is there any way for us to know if the user has tampered the logic and hence alert other browsers that it's malicious
The execution boundary is WASI-based and deny-by-default.
No shell / fork API. No socket API in the tested interface. No host filesystem preopens by default. No unrestricted environment. No WebAssembly threads.
So the interesting result isn't simply that "one sandbox is better than another."
It's that the execution model itself changes the attack surface.
And we didn't just claim it.
The benchmark is reproducible from the public repository, including the raw evidence.
We ship Hexana, a plugin for JetBrains IDEs that opens Wasm and native binaries in the editor. 0.20 is out. Four things here are Wasm-relevant. The rest of the release covers other formats; we will not pad this post with it.
**1. Runtime compatibility for WebAssembly binaries**
The pain: your module uses a proposal, one of your target runtimes does not support it, and you learn that at deploy time.
- Declare the runtimes you ship against: Settings | Build, Execution, Deployment | WebAssembly | Runtime Compatibility.
- Hexana checks every `.wasm` you open against the declared set.
- Unsupported proposals turn the proposals badge into a warning and open a new Compatibility tab.
- Verdicts come from WebAssembly's `features.json`.
- Nothing declared? The tab still lists which runtimes support each proposal. Useful for a file you did not build yourself.
- The declaration is written to `.hexana/runtimes.json`. The VS Code extension reads the same file, so the setup moves with the project.
**2. Breakpoints in binary views, before a session exists**
- Click the gutter in WAT (virtualized) or Disassembly. No debug session needed.
- The breakpoint anchors to the binary's content hash, not the path. Rename, move, restart: it stays.
- A rebuild marks it stale instead of leaving it silently displaced.
- The gutter icon shows what the runtime did: registered, instruction-precise, degraded, or stale.
- Honest limitation: conditions and hit counts are not supported yet.
**3. Debugger Console tab**
A raw LLDB command line for wasmtime and WAMR sessions. Execution control stays routed through the IDE's debug actions, so the console cannot desync the IDE's view of the session. Not available for GraalWasm or CDP sessions.
**4. Component Dependencies graph is navigable**
Double-click a core module or nested component: it opens in its own tab. Double-click an import or export: its bytes get selected in the hex view.
**One behavior change worth knowing**
Script tabs run sandboxed now. Up to and including 0.18 a script tab had full host access and could call arbitrary Java. Now: no host classes, no processes, no threads, no native access, a timeout, bounded output. `open(path)` parses another file into the same read-only `binary` API and is the only file-system access. Scripts that relied on host classes will break. Scripts that inspect binary data keep working.
---
What runtimes are you actually shipping Wasm against in production? The checker covers what `features.json` tracks. Curious what is missing from that dataset.
Hi all, I built this framework over the last month or so during my free time and thought y’all might be interested. I’d especially like to point out the module refresh mechanism I built to keep memory footprints under control since the WASM spec only allows memory to grow linearly. But any feedback at all that you have would be appreciated! And just to be frank, yes I did use claude for the code writing, but I architected each individual detail of how this framework works myself. Beyond being a passion project, it taught me a lot from several aspects of desktop development, to custom LSPs and more
In my excitement about finally getting WasmPascal working, I sort of forgot why I built it in the first place: I was looking for a way to compile small Wasm modules quickly and easily. In https://nofuss.co.za/blog/wasm_pascal_add_numbers/, I show how to do just that. It's the classic adding two numbers example, but in Pascal, compiled to a small binary in the browser. You can then load it the usual way via JavaScript. I should have started with this, I geeked out hard 😆