README.md

spark-rs

A personal, Spark-style email client with a Rust core. First target: Windows on ARM (aarch64-pc-windows-msvc).

Created in T3 Code.

Layout

1crates/store SQLite storage (bundled SQLite with FTS5)
2apps/cli spark-cli, the headless dev tool
3apps/desktop desktop app UI: React + Tailwind + daisyUI (Vite)
4apps/desktop/src-tauri desktop app shell (Tauri 2), serves the demo mailbox
5tools/cross Docker image for building Windows binaries on Linux

Building

Everything builds in a Docker image, so the host needs nothing besides Docker. The first run builds the image (a few minutes). On the first Windows build, cargo-xwin downloads the MSVC CRT and Windows SDK (about 5 GB, cached in ~/.cache/spark-rs-cross); using those means accepting Microsoft's license terms for them.

sh
1# Linux: lint, test, run
2tools/cross/run.sh cargo clippy --workspace --all-targets -- -D warnings
3tools/cross/run.sh cargo test --workspace
4tools/cross/run.sh cargo run -p spark-cli -- doctor
5
6# Desktop UI: build it first (Node on the host); the app embeds apps/desktop/dist
7(cd apps/desktop && npm install && npm run build)
8(cd apps/desktop && npm run dev) # UI alone in a browser at localhost:1420, demo data
9
10# Windows on ARM
11tools/cross/run.sh cargo xwin build --release --target aarch64-pc-windows-msvc -p spark-desktop -p spark-cli
12# → target/aarch64-pc-windows-msvc/release/{spark-desktop,spark-cli}.exe

spark-desktop.exe is a single file with the UI embedded; it needs the WebView2 runtime, which Windows 11 includes. On the Windows machine, spark-cli.exe doctor checks that SQLite, TLS and networking work there.

TLS uses rustls with the aws-lc-rs backend. Don't switch it to ring: ring's build forces plain clang on ARM64 Windows, which fails with cargo-xwin's MSVC-style flags.