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.
73 lines
1.4 KiB
JSON
73 lines
1.4 KiB
JSON
{
|
|
"$schema": "https://schema.tauri.app/config/2",
|
|
"productName": "Mission Control",
|
|
"version": "0.1.0",
|
|
"identifier": "com.mission-control.app",
|
|
"build": {
|
|
"beforeDevCommand": "npm run dev",
|
|
"devUrl": "http://localhost:1420",
|
|
"beforeBuildCommand": "npm run build",
|
|
"frontendDist": "../dist"
|
|
},
|
|
"app": {
|
|
"withGlobalTauri": false,
|
|
"windows": [
|
|
{
|
|
"title": "Mission Control",
|
|
"width": 800,
|
|
"height": 600,
|
|
"resizable": true,
|
|
"fullscreen": false,
|
|
"center": true,
|
|
"hiddenTitle": true,
|
|
"decorations": true,
|
|
"transparent": false,
|
|
"visible": true
|
|
}
|
|
],
|
|
"trayIcon": {
|
|
"iconPath": "icons/icon.png",
|
|
"iconAsTemplate": true
|
|
},
|
|
"security": {
|
|
"csp": null
|
|
}
|
|
},
|
|
"bundle": {
|
|
"active": true,
|
|
"icon": [
|
|
"icons/32x32.png",
|
|
"icons/128x128.png",
|
|
"icons/128x128@2x.png",
|
|
"icons/icon.icns",
|
|
"icons/icon.ico"
|
|
],
|
|
"targets": "all",
|
|
"macOS": {
|
|
"minimumSystemVersion": "10.15"
|
|
}
|
|
},
|
|
"plugins": {
|
|
"shell": {
|
|
"open": true,
|
|
"scope": [
|
|
{
|
|
"name": "lore",
|
|
"cmd": "lore",
|
|
"args": true
|
|
},
|
|
{
|
|
"name": "br",
|
|
"cmd": "br",
|
|
"args": true
|
|
},
|
|
{
|
|
"name": "bv",
|
|
"cmd": "bv",
|
|
"args": true
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|