- desktop/Cargo.toml: Tauri + plugins (dialog, notification, fs, updater) - desktop/tauri.conf.json: Windows (.msi/.nsis) + Linux (.deb/.AppImage) config - desktop/src/main.rs: spawn Python backend, health check, tray icon, commands - desktop/build.rs: Tauri build hook - desktop/python-embed/sidecar.py: uvicorn launcher with port auto-detect - build-windows.bat: automated Windows build with Python embed download - build-linux.sh: automated Linux build with venv - desktop/README.md: architecture doc + usage guide - desktop/validate-structure.sh: CI validation script - ROADMAP.md: #77 Tauri Desktop section added
ObsiGate Desktop
Application desktop native pour ObsiGate — construite avec Tauri.
🚧 Phase de conception — les binaires ne sont pas encore disponibles.
Prérequis
Windows
- Rust (stable ≥ 1.75)
- Tauri CLI :
cargo install tauri-cli - NSIS (inclus dans le build)
- Python 3.11 embed (téléchargé automatiquement)
Linux
sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev
cargo install tauri-cli
Build
Windows
cd desktop
build-windows.bat
→ Produit target/release/bundle/msi/ObsiGate_2.0.0_x64.msi + .exe NSIS
Linux
cd desktop
chmod +x build-linux.sh
./build-linux.sh
→ Produit target/release/bundle/deb/obsigate_2.0.0_amd64.deb + .AppImage
Architecture
desktop/
├── Cargo.toml # Dépendances Rust
├── tauri.conf.json # Config Tauri (fenêtre, bundle, plugins)
├── build.rs # Script build Tauri
├── src/
│ └── main.rs # Point d'entrée Rust : spawn backend + webview
├── python-embed/
│ ├── sidecar.py # Lance uvicorn sur 127.0.0.1:17890
│ └── ... # Python 3.11 + site-packages (gelés)
├── build-windows.bat # Script build Windows
├── build-linux.sh # Script build Linux
└── icons/ # Icônes desktop (.ico, .png, .icns)
Fonctionnalités desktop natives
| Fonctionnalité | Web | Desktop |
|---|---|---|
| Accès fichiers local | Via upload | Natif (sélecteur dossier) |
| Thème système | Manuel | Auto (suit OS dark/light) |
| Notifications | Service Worker | Natif OS |
Associations .md |
❌ | ✅ « Ouvrir avec ObsiGate » |
| Tray icon | ❌ | ✅ Barre des tâches |
| Auto-update | ❌ | ✅ Vérifie releases Gitea |
| Mode hors-ligne | Limité | Complet (backend local) |
Cycle de vie
Démarrage :
1. Tauri lance python-embed/python → uvicorn backend.main:app
2. Health check GET /api/health (timeout 15s)
3. Webview ouvre http://127.0.0.1:17890
Arrêt (tray → Quitter ou fermeture fenêtre) :
1. SIGTERM envoyé au processus Python
2. Backend s'arrête proprement (10s timeout)
3. Tauri ferme la webview
4. Processus nettoyé — aucun résidu