Preview
sure-mail
A mail client whose entire logic lives in a headless core compiled to WASM — accounts, IMAP, MIME, SMTP, the mailbox store and local search — cleanly separated from every host. Hosts only move bytes and draw pixels.
Properties
- One core, many hosts
- Local-first
- No framework
- No runtime dependency
- MIT-licensed
- Mail never leaves the device
- AssemblyScript → WASM
The client is a host. The product is the core.
Most mail clients put their protocol handling, storage and UI in the same program, so every new surface — desktop, browser, phone, plugin — reimplements a fraction of the same behaviour and drifts. sure-mail inverts that: the core owns accounts, IMAP, MIME, SMTP, autodiscover, the bounded local store and local search, and each host is a small adapter that moves bytes and draws pixels.
One core, compiled once
The engine is AssemblyScript compiled to a WASM module. The same core runs behind the command line, inside a browser worker, and — planned — inside a mail client plugin. Behaviour is defined once, not per platform.
Hosts are thin
A host supplies network, storage, DNS and HTTP ports and nothing else. There is no mail logic in any host, which is what makes a new surface cheap instead of a fork.
Local search, not a server round-trip
Messages are indexed in the local store, so search works offline and instantly. The index is rendered from a shared storage contract rather than hand-written per engine.
Bounded by design
The store is deliberately short — a phone keeps about a month, a desktop can keep years. It is a working set with an eviction policy, not a full mirror of the mailbox.
No framework in the client
The browser app is plain DOM with element factories and a skin engine that injects CSS. No React, no bundler runtime, no state library — which is why it loads on hardware that current frameworks have left behind.
The plugin is optional
The planned mail-client plugin consumes the same core. It is a consumer, never a prerequisite: the command line and the browser app work with no plugin installed.
Status
What works today
Done
Core and command line; autodiscover; SMTP and the shared send flow; the browser host with a local store; the application shell; and four skins with mobile and accessibility work. Search is local and covered by tests.
In progress
Portability of the local store across SQL engines, and the packaging that turns the browser page from a demo into something a non-developer can install.
Not yet
The optional mail-client plugin, and the agent features. Neither blocks the client: they are consumers of the core, not dependencies of it.
The preview page is a static build. It boots and shows the shell without a server; reading mail needs a local host on the same machine. It is a preview of the interface and the engine, not a hosted mailbox — which is deliberate, because mail credentials should never be entered into somebody else's page.
Install
Run the WASI server
The network layer is a WASI 0.2 component, so the guest carries no TLS stack and no platform code: the runtime supplies sockets, DNS and TLS as host capabilities. It builds once for every target and is 146 KB.
cargo build --release --target wasm32-wasip2
# → wasi-socket-server.wasm
wasmtime run -S cli=y -S tcp=y -S allow-ip-name-lookup=y -S inherit-network=y \
wasi-socket-server.wasm listen 127.0.0.1:9100
Two modes, shaped like the browser relay — accept in, dial out:
wasi-socket-server listen <addr> echo server
wasi-socket-server connect <addr> [message] dial out, send, read the reply
The flags are the mechanism: -S cli=y supplies the WASI CLI surface, -S tcp=y supplies wasi:sockets, -S allow-ip-name-lookup=y supplies DNS, and -S inherit-network=y grants access to the host's addresses. On a phone there is no wasmtime command line — the same crates are embedded in a small host with the same switches.
Download
wasi-socket-server-0.1.0.wasm 143 KB · MIT · WASI 0.2 component
sha256 9d16123dffb30c5ac73d52272df0baa0c9da7662ab026ba1690854b6f35e7c37
Built for wasm32-wasip2 with rustc 1.99.1, and reproduced byte-for-byte from a clean build — the hash above is the one the build produces, not a copy of it. Verify against the checksum file.
This is the socket layer, not the mail relay: it listens and dials, and a host embeds it. The client still needs its local host, which is a source build for now — ask us if you want to run mail end to end.
Limits
What this is not
- Not a hosted mailbox — no account is created and no credential is collected here.
- Not a full local mirror — the store is a bounded working set with an eviction policy.
- Not feature-complete — the plugin and agent surfaces are unbuilt, and the install story is the next milestone.