Technical Architecture

Tabularis represents a modern approach to desktop application development, moving away from resource-heavy Electron in favor of the Tauri framework. It bridges the performance and memory safety of Rust with the component-driven UI capabilities of React.

The Tauri IPC Bridge

In Tabularis, the UI runs in a secure, isolated WebView, while all database connections, file I/O, and secure storage happen in the Rust backend. Communication between the two layers happens via Tauri's Asynchronous Inter-Process Communication (IPC) system, specifically through invoke commands.

// Frontend (React)
const result = await invoke<QueryResponse>("execute_query", { 
    connectionId: "conn-123",
    query: "SELECT * FROM users"
});
// Backend (Rust)
#[tauri::command]
async fn execute_query(
    connection_id: String,
    query: String,
    state: tauri::State<'_, AppState>
) -> Result<QueryResponse, String> {
    // Rust handles the thread-safe connection pool and execution
}

Core Rust Components

1. Unified Driver Trait

To support diverse database engines, Tabularis implements a strict trait (DatabaseDriver) in Rust. This ensures that the frontend React code does not need to know the specifics of PostgreSQL vs MySQL dialects when requesting schemas.

2. Connection State & Concurrency

The application state is managed using tokio and thread-safe data structures.

struct AppState {
    pools: Arc<DashMap<String, PoolType>>,
    tunnels: Arc<DashMap<String, SshTunnel>>,
}

Using DashMap prevents blocking the entire application when one connection is establishing a slow SSH tunnel, ensuring the UI remains perfectly fluid.

3. Asynchronous Streaming

When a query returns 100,000 rows, Tabularis doesn't attempt to send a massive 50MB JSON payload across the IPC bridge. Instead, the Rust backend serializes the results into chunks and streams them via Tauri events, populating the frontend Data Grid incrementally.

Frontend Architecture

Security Model & Process Isolation