Skip to main content

storage

Function storage 

Source
pub fn storage<R: Runtime>(
    app: &AppHandle<R>,
    config: &HostConfig,
) -> Result<Arc<dyn Storage>>
Expand description

SQLite storage in the platform’s app-data directory.

The directory comes from origin_platform::paths, not from Tauri’s path resolver: a headless run of the same product has no AppHandle and must reach the same database. Two independent derivations of one directory is how a headless mode ends up looking at an empty file.

The file holds cache, read models and settings only — losing it costs a resync, nothing more (ADR-0008).