We recently made a web version of the delta chat desktop UI. [blog post coming soon]
The downside to this is, that it still needs a local server component to run chatmail core (formely known as deltachat-core-rust).
Ideally we would be able to not need to this server component and run delta chat as fully standalone web app or browser plugin.
Our core library is written in rust and rust a popular source language for compiling to webassembly, so why not “just” compile core to wasm?
Unfortunately it is not quite that simple. Here is a (non complete) list of what we would need to make this possible:
- threading in wasm, we use tokio as async runtime, which only has limited wasm support.
- performant sqlite database in the browser
- google made it possible, but we’d still need to figure out how to link to their solution in rust
- Since browsers don’t have an API for raw TCP sockets (which is the basis of the email protocls IMAP and SMTP) we would need a proxy to websocket
- the good news is that we could integrate such a proxy into the chatmail relay package
- JMAP (replaces IMAP and SMTP for mail clients) already includes websockets, this could be a reason to finally implement JMAP. (RFC 8887: A JSON Meta Application Protocol (JMAP) Subprotocol for WebSocket)
- Blobs (basically files like avatars and attachments)
- could be stored with filesystem api or inside of IndexedDB
- OpenSSL
- probably hell to compile to wasm, but we don’t really need it when we trust the proxy:
email server <-TLS IMAP/SMTP -> proxy <- TLS websocket -> browser <-> DC Web
- probably hell to compile to wasm, but we don’t really need it when we trust the proxy:
We already have:
- web UI that is independent from electron
- an API that can be used in the browser → jsonrpc api
Let’s use this thread to share progress and discuss ideas for making a standalone version of delta chat web.