Files
Mermix/src-tauri/src/state.rs
Aleksey Shakhmatov 890390bc65 feat(backend): Rust core for projects, diagrams and Git
- sqlx/SQLite registry of known projects + user settings (db.rs)
- project create/open with mermix.toml config and slugged paths (project.rs)
- diagram CRUD on .mmd files with frontmatter titles and path-traversal
  guards (diagram.rs)
- git2-backed versioning: commit-all, history, branches, checkout,
  working-tree status (git_ops.rs)
- Tauri command surface, shared state and unified error type
- headless tests covering project creation, diagram CRUD and branch
  isolation (tests.rs)
2026-05-22 16:27:20 +03:00

15 lines
513 B
Rust

use std::path::PathBuf;
use sqlx::SqlitePool;
/// Application-wide state shared across all Tauri command invocations.
pub struct AppState {
/// Connection pool for the app-level metadata database (project registry,
/// user settings). Per-project data lives on disk inside each Git repo.
pub db: SqlitePool,
/// Directory where Mermix stores its own data (the registry database).
/// Retained on the state for diagnostics and future use.
#[allow(dead_code)]
pub data_dir: PathBuf,
}