Skip to content

@statesync/tauri


@statesync/tauri / TauriSnapshotProviderOptions

Interface: TauriSnapshotProviderOptions

Defined in: transport.ts:146

Configuration for createTauriSnapshotProvider.

Properties

args?

ts
optional args: Record<string, unknown>;

Defined in: transport.ts:175

Optional additional arguments forwarded to the Tauri command on every call.

Useful for passing identifiers like a user ID or workspace key so the backend knows which slice of state to return.

Example

typescript
{ workspaceId: 'ws_abc123' }

commandName

ts
commandName: string;

Defined in: transport.ts:162

The name of the Tauri command that returns the current snapshot.

The Rust command must return a JSON object matching { revision: string, data: T } (i.e., a SnapshotEnvelope).

Example

ts
`'get_app_state'`

invoke

ts
invoke: TauriInvoke;

Defined in: transport.ts:152

A Tauri-compatible invoke function used to call Rust commands.

See

TauriInvoke

Released under the MIT License.