Projects / DeltaTauri
DeltaTauri
About this project
This NLnet-funded prototype involved restructuring the Delta Chat Desktop codebase into a modular monorepo and building a new Tauri-based runtime target. The motivations were the usual ones for trying Tauri: smaller downloads, lower resource usage, and better security through Rust's memory safety - plus a fair bit of Electron fatigue from the community.
Monorepo reorganization
Before the Tauri port could begin, the codebase needed to be decoupled from Electron. I reorganized the repository into a modular monorepo using pnpm workspaces, splitting the UI, shared logic, and platform targets into separate packages. This also enabled a Browser Edition that proved the frontend could run independently of Electron and let us reintroduce end-to-end UI testing with Playwright - something that had been too buggy on Electron.1
For managing the monorepo I chose pnpm, which turned out to be a
double-edged sword: its content-addressable store is great for disk
efficiency, but it caused friction with electron-builder (which
needed workarounds) and with Flathub's offline build system, which at the time only
supported yarn and npm.
Webxdc sandboxing
Delta Chat supports webxdc mini apps - small web apps that run inside the messenger. The security model requires that these apps have no internet access and can only communicate through the API provided by the host messenger. Since webxdc apps are untrusted user-generated content, the system APIs and Delta Chat internals must be inaccessible to prevent malicious apps from doing harm.
Tauri's capability-based permission system was a natural fit for this.
We designed the sandboxing so that each window type gets different
permissions, and introduced custom URL schemes like dcblob:// to serve attachments without exposing the filesystem. Together with WofWca, we went through an extensive list of hardening steps: dummy SOCKS proxies to block network access, WebRTC disabling, DNS
blocking, strict CSP, MIME sniffing protections, and disabling all Tauri
commands by default for sandboxed windows.
Challenges & upstream contributions
Tauri's ecosystem was younger than Electron's, and we ran into missing features and bugs along the way. Where Electron provides a single consistent Chromium runtime, Tauri relies on platform webviews - WebKit on macOS and Linux, Chromium-based WebView2 on Windows. This meant dealing with rendering differences, inconsistent API support, and platform-specific bugs across all three targets.
When we hit gaps, we contributed back to the Tauri ecosystem. The most significant contribution was the user-notify crate - a cross-platform notification library we built because Tauri's built-in solution was too limited for Delta Chat's needs.
Results
The Tauri edition achieved near-complete feature parity2 with Electron and delivered significant download size reductions across all platforms:
It also brought unique features like autostart, instant webxdc app loading, and macOS notification replies.
Benefits to upstream
Beyond the Tauri edition itself, this project improved the main Delta Chat Desktop codebase in several ways:
- The monorepo reorganization made the codebase more modular and less coupled to Electron as a runtime
- End-to-end UI testing was reintroduced through the Browser Edition and Playwright
- An NLnet-sponsored accessibility audit uncovered issues that were fixed across the shared UI
- Features like autostart were later adopted by the Electron version as well
Current status
The Tauri edition is functional and ships as an experimental download alongside each Electron release. It is community-maintained; the core team focuses on Electron as the official target. Some Linux-specific issues (notification bugs, GPU crashes, performance issues, missing camera/microphone support) remain blockers for fully replacing the Electron version.
What I learned
This project touched many different areas. I learned how to work
directly with platform-native APIs using the objc2 crate
for macOS, and gained hands-on experience with webview sandboxing and
security hardening. Managing a multi-package monorepo with pnpm taught
me a lot about dependency management at scale, and supporting three
platforms with two different browser engines gave me a deep
appreciation for cross-browser testing and platform-specific debugging.
Further reading
There is also a blog post in the works for the Delta Chat blog, but it is unclear when it will be published. If you're feeling adventurous, you can preview the draft.
- The previous testing framework (TestCafe) had an Electron-specific crash bug I was never able to track down. Testing frameworks like Playwright and TestCafe are primarily built for websites, so testing the UI directly in a browser beats going through an adapter for Electron.
- Notable missing features are maps (location streaming) and calls.