Skip to content

WebAssembly, explained: how a browser tab became a small computer

A browser tab can now run a real database, Python and AI models, with no server. The reason is WebAssembly. What it is in plain words, what it is good and bad at, and how you can spot it yourself.

Dannick K.
October 13, 2026 · 3 min read
PresentBoard
A pipeline from SurrealDB through a compiler and a .wasm file to your browser, where a small database runs in the tab.
Share
On this page
  1. What WebAssembly is
  2. Fast and safe, with one rule
  3. Where it shows up in AWFlow
  4. See it yourself

For most of the web’s history, a page could run one language, JavaScript, and serious software lived on servers. Databases, Python scripts and AI models were things a website called, never things it contained.

That has quietly changed. A single tab can now host a real database, a Python interpreter and AI models, all running on your own machine. The technology that made it possible has a slightly dull name, WebAssembly, and it is worth understanding, because it is also what lets software keep your data on your device.

What WebAssembly is

The database ships as WebAssembly, so it runs inside the page instead of on a server.

GlossaryWebAssembly

A compact program format every modern browser can run safely, at close to the speed of an app installed on your computer.

A portable binary instruction format, validated and compiled by the browser engine, run in the page's sandbox and called from JavaScript. Often shortened to Wasm.

WasmJavaScriptRust

What it means: a safe, compact, fast program format.Binary modules, validated and compiled to machine code by the engine.

Glossary term
Text version
  1. The database ships as WebAssembly, so it runs inside the page instead of on a server.
  2. WebAssembly: A compact program format every modern browser can run safely, at close to the speed of an app installed on your computer. A portable binary instruction format, validated and compiled by the browser engine, run in the page's sandbox and called from JavaScript. Often shortened to Wasm. (Wasm, JavaScript, Rust)

The trick is where the program comes from. Developers write it in a language built for speed, such as Rust or C++, and a compiler turns it into a small .wasm file. Your browser downloads that file like an image and runs it.

A concrete example: SurrealDB is a database written in Rust. Compiled to WebAssembly, the same database runs inside a browser tab.

SurrealDBa database written in Rust
Compiler
.wasm file
Your browser
Runs in your tab
a real database, on your device

Now the database lives in your tab.Queries run locally, against storage on your device.

Pipeline
Text version
  1. SurrealDB: Rust source code
  2. Compiler: targets WebAssembly
  3. .wasm file: a compact binary module
  4. Your browser: checks it, then compiles it
  5. Runs in your tab: a real database, on your device

A database written for servers

SurrealDB was written in Rust, a language normally used for software that runs on servers and desktops.

Compiled to WebAssembly

The same source code is compiled to a different target: WebAssembly instead of a particular processor.

Shipped as a file

What comes out is a .wasm file: compact, and downloaded like any other web asset.

Checked by the browser

Before running it, the browser validates the module. Code that breaks the rules is refused.

Running next to you

The database now runs in your tab, on your machine, with your data stored locally.

Fast and safe, with one rule

Two properties make WebAssembly useful. It is safe: a module runs inside the same sandbox as the page, and cannot reach your files or other tabs. And it is fast at heavy computation, close to the speed of an installed app.

There is one rule people miss. WebAssembly cannot touch the page directly. It does the heavy work, and JavaScript, which runs the page, asks for results and draws them:

JavaScriptruns the page
DatabaseWebAssembly
The screen
find workflows named "price"
3 matching rows
draws the list

JavaScript draws it. Wasm never touched the screen.Wasm has no direct DOM access; rendering stays in JavaScript.

Conversation
Text version
  1. JavaScript → Database: find workflows named "price"
  2. Database → JavaScript: 3 matching rows
  3. JavaScript → The screen: draws the list
Myth

WebAssembly is going to replace JavaScript.

Fact

They are a team. JavaScript runs the page; WebAssembly does the heavy work it is handed.

The fact. Each does what it is good at.Gains are largest on computation-heavy code and small on DOM-heavy work.

Myth vs fact
Text version
  1. WebAssembly is going to replace JavaScript.
  2. They are a team. JavaScript runs the page; WebAssembly does the heavy work it is handed.

It has a cost too: the .wasm file must be downloaded before it runs, and some are large. That is why tools built on it can feel slow the very first time and quick after.

Where it shows up in AWFlow

AWFlow is a browser extension, yet it does things that used to need a server. WebAssembly is a large part of why. Zoom into an AWFlow tab:

An AWFlow tab › Your local data

Your local data

Workflowsand their runs
Credentialsencrypted
Chats and memoryfor the assistant
Knowledge basestext and vectors

Your local data is a real database, in the browser.In a local workspace, workflows, runs, credentials, chats, memory and knowledge bases are stored in the in-browser database.

Zoom levels
Text version
  1. An AWFlow tab: The canvas (JavaScript), Your local data (WebAssembly), On-device models (WebGPU or Wasm), Python steps (WebAssembly)
  2. Your local data: Workflows (and their runs), Credentials (encrypted), Chats and memory (for the assistant), Knowledge bases (text and vectors)

That database is what makes a local workspace possible: no account, and everything saved on your device. It also holds your knowledge bases, the documents an agent can search, together with the vectors used to find passages by meaning. The search engine that creates those vectors is a small model that runs on your device too:

The New knowledge base dialog: Name (Support answers), What's in it, a Sources drop zone with Web page and Paste text buttons, Who can read it with Cloud OK selected and Device only, the Search engine line (all-MiniLM-L6-v2 on this device), and Cancel and Create buttons.The New knowledge base dialog: Name (Support answers), What's in it, a Sources drop zone with Web page and Paste text buttons, Who can read it with Cloud OK selected and Device only, the Search engine line (all-MiniLM-L6-v2 on this device), and Cancel and Create buttons.

Your documents, indexed and searched in your browser.Passages and vectors are stored locally.

Guided screenshot
Text version
  1. 1. Search engine: A small model, on this device.
  2. 2. Who can read it: Cloud OK, or Device only.

The Python steps work the same way. AWFlow’s Code node runs Python 3 with its standard library, in the browser, with nothing to install, because Python itself has been compiled to WebAssembly by the open-source Pyodide project.

See it yourself

You can spot WebAssembly on any site in a minute. Open Chrome DevTools, go to the Network tab, reload the page and click the Wasm filter. You will see each .wasm file the page downloaded and how large it is.

The takeaway

WebAssembly turned the browser tab into a small computer.

A small computer: a database, Python and AI, all local.Server software, shipped as modules that run on the client.

Kinetic line
Text version
  1. The takeaway: WebAssembly turned the browser tab into a small computer.

For you, the practical result is simple: software that used to need a server, and your data on that server, can now run where you are. Here is the easiest way to see it in AWFlow: start in a local workspace, with no account at all.

The welcome page in a local workspace: a Local · no account needed badge, the headline Press Run. Watch a workflow do its thing., the Run “Start here” button (about 5 seconds), and three other ways in: Start from a template, Describe it to the AI and the 2-minute tutorial, with Skip to the app below.The welcome page in a local workspace: a Local · no account needed badge, the headline Press Run. Watch a workflow do its thing., the Run “Start here” button (about 5 seconds), and three other ways in: Start from a template, Describe it to the AI and the 2-minute tutorial, with Skip to the app below.

That is all local, from the first click.No account and no server round trip for local workflows.

Guided screenshot
Text version
  1. 1. No account needed: Everything is saved on this device.
  2. 2. Press Run: Watch a first workflow run.

What we covered

  1. Wasm is a safe, fast program format
  2. JavaScript draws, Wasm does the heavy work
  3. It is why your data can stay local

Three. A database, Python and models, in your tab.SurrealDB, Pyodide and on-device models in AWFlow.

Recap
Text version
  1. What we covered
  2. Wasm is a safe, fast program format
  3. JavaScript draws, Wasm does the heavy work
  4. It is why your data can stay local

Automate the web you're on. Free, in your browser.