Technical Deep Dive: Keeping it Lean #
The biggest challenge wasn't the UI, but the binary size. I managed to get the installer under 5 MB by obsessing over dependencies and compiler flags. For example, using panic = "abort"
stripped about 6 MB of unwind tables. I also stripped out redundant crypto libraries to avoid dead weight.
Here is a snippet from my Cargo.toml
showing how I handled the feature flags to save space:
rustls = { version = "0.23", default-features = false, features = ["ring"] }
Since I used Tauri 2, the app leverages the system WebView2 rather than bundling a whole browser, which keeps resource consumption incredibly low.
AI Workflow & Security #
Instead of a basic RAG implementation, I built an LLM agent loop for the "Ask your inbox" feature. The model uses tool-calling with search_emails
, read_email
, and fetch_url
to perform multi-step retrieval, providing citations back to the original emails. You can hook this up to Anthropic, OpenRouter, or a local Ollama instance.
Security is handled by treating HTML as hostile. I implemented a three-layer defense:
- Sanitization: Using
ammonia
in Rust to clean markup before it hits the IPC boundary.
- Sandboxing: Rendering emails in an iframe with no
allow-scripts
and a strict CSP.
- Privacy: Remote images are stripped by default to block silent trackers.
Performance Architecture #
The app is strictly offline-first. Every action (archiving, deleting, starring) is wrapped in a single SQLite transaction and pushed to an operation queue. This allows the UI to update instantly while the server syncs in the background. For search, I'm using SQLite FTS5 with bm25 ranking, ensuring that searching through thousands of emails is instantaneous even without an internet connection.
If you're looking for a lightweight, keyboard-driven alternative to Outlook, this is a great way to integrate your own LLM into your mail flow.
https://skim-tech.com
Next Topcoat: A Full-Stack Rust Alternative to Next.js →