feat: scaffold Tauri 2.0 backend foundation

Set up the Rust backend for Mission Control using Tauri 2.0:

Cargo Configuration:
- Cargo.toml: Tauri 2.0, serde, thiserror, tracing, mockall
  - Library crate (mission_control_lib) for testability
  - Binary crate for Tauri entry point
- Cargo.lock: Pinned dependencies for reproducible builds

Tauri Configuration (tauri.conf.json):
- App identifier: com.mission-control.app
- Window: 800x600, centered, hiddenTitle for clean macOS look
- Shell plugin scoped to lore, br, bv commands only
- Tray icon configured for background operation

Application Bootstrap:
- src/main.rs: Minimal entry point, delegates to lib
- src/lib.rs: Tracing setup, plugin registration, command handlers
  - Debug mode: auto-opens devtools
  - Safe window lookup (no unwrap panic)
- build.rs: Tauri build script for codegen

Architecture: The lib/bin split enables unit testing the Tauri
command handlers without launching the full app.
This commit is contained in:
teernisse
2026-02-25 17:01:14 -05:00
parent 7877ff9218
commit 62ee08de29
6 changed files with 5540 additions and 0 deletions

41
src-tauri/Cargo.toml Normal file
View File

@@ -0,0 +1,41 @@
[package]
name = "mission-control"
version = "0.1.0"
description = "ADHD-centric personal productivity hub"
authors = ["Taylor Eernisse"]
edition = "2021"
[lib]
name = "mission_control_lib"
crate-type = ["lib", "cdylib", "staticlib"]
[[bin]]
name = "mission-control"
path = "src/main.rs"
[build-dependencies]
tauri-build = { version = "2", features = [] }
[dependencies]
tauri = { version = "2", features = ["tray-icon"] }
tauri-plugin-shell = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1", features = ["full"] }
thiserror = "2"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
chrono = { version = "0.4", features = ["serde"] }
dirs = "5"
notify = "7"
[dev-dependencies]
tempfile = "3"
mockall = "0.13"
[profile.release]
panic = "abort"
codegen-units = 1
lto = true
opt-level = "z"
strip = true