Expand description
Rust SDK for Lix.
Embedded version control for files and data.
§Quick start
let lix = lix::open_lix().await?;open_lix opens an in-memory repository. Add a storage adapter with
OpenLixBuilder::with_storage when persistence is needed.
Re-exports§
pub use telemetry::bind_session;pub use storage::Memory;pub use lix_schema as schema_v1;
Modules§
- migration
- Explicit repository inspection and detached format migration. Ordinary engine admission accepts only the current format; historical decoders and converters compile only in the offline-migration artifact.
- plugin
- Lix plugin authoring and runtime integration.
- snapshot
- storage
- Primary storage API.
- telemetry
- wasm
- General WebAssembly compute configuration for Lix.
Structs§
- Blob
- Immutable, cheaply cloned binary SQL value.
- Branch
Id - Callback
Open Progress Sink - Adapts a Rust closure to
OpenProgressSink. - Canonical
Plugin Key - Canonical
Schema Key - Commit
Receipt - The durable result of committing one transaction.
- Commit
Span - The active-branch commits a write moved between.
- Create
Branch Options - Options for creating a new branch from the session’s active branch.
- Create
Branch Receipt - Receipt returned after creating a branch.
- Create
LixBuilder - Configures explicit hosted creation. The URL addresses a host, not a repository.
- Delete
LixBuilder - Execute
Batch Builder - Configures one atomic SQL batch execution.
- Execute
Batch Result - Statement results and the single durable transition published by their batch.
- Execute
Batch Statement - One SQL statement to execute as part of an atomic batch.
- Execute
Builder - Configures one SQL statement execution.
- Execute
Result - Result of executing one SQL statement through engine.
- FileId
- Hosted
Lix - A hosted resource locator, independent of any open session.
- Json
- Canonical JSON text carried by a SQL value.
- Lix
- Clonable handle for a Lix repository.
- LixError
- Structured error type surfaced by Lix to every SDK binding.
- LixNotice
- LixPath
- A validated absolute Lix logical filesystem path.
- LixTransaction
- Merge
Branch Options - Options for merging another branch into this session’s active branch.
- Merge
Branch Preview - Merge
Branch Preview Options - Options for previewing a merge from another branch into this session’s active branch.
- Merge
Branch Receipt - Receipt returned after merging a branch.
- Merge
Change Stats - Observe
Event - Observe
Events - A live query observation bound to the local storage session.
- Open
Another Session Builder - Configures another independent session for an open Lix repository.
- Open
LixBuilder - Configures a session after local storage has been explicitly selected.
- Open
LixFrom Snapshot Builder - Restores a snapshot into fresh storage and then opens the resulting Lix.
- Open
Migration Report - The migration performed by this open, if any.
- Open
Progress - One Lix-open progress snapshot.
- Open
Report - Immutable facts about how this handle was opened.
- Redo
Receipt - Remote
Execute Batch Builder - Configures an atomic SQL batch on the server.
- Remote
Execute Builder - Configures execution on a remote repository.
- Remote
Lix - A repository whose operations execute on its server.
- Remote
LixTransaction - A transaction executing on the remote repository.
- Remote
Observe Events - Observation events streamed from the remote repository.
- Remote
Open Another Session Builder - Configures an independent remote session.
- Remote
Open LixBuilder - An open request with a server but no explicitly selected local storage.
- Remote
Transaction Execute Builder - Configures SQL executed inside a remote transaction.
- Replica
Recovery Blob - Replica
Recovery Branch - Replica
Recovery Export - Replica
Recovery File - Replica
Recovery Receipt - Replica
Recovery Row - Replica
Recovery Source - Result
RowRef - Zero-copy row view with access to the result-set column names.
- Row
- One owned row returned by a query.
- RowRef
- Opaque address of one logical row in one Lix relation.
- Server
Options - Connection information for a hosted Lix repository.
- Session
Transaction - Shared
Str - Immutable UTF-8 backed by a cheaply cloned byte buffer.
- SqlQuery
Result - SqlScript
Plan - Parsed statement and parameter boundaries produced by
parse_sql_script. - SqlScript
Statement - One executable statement in a parsed SQL transaction script.
- Switch
Branch Options - Options for switching a session to another branch.
- Switch
Branch Receipt - Receipt returned after switching to another branch.
- Sync
Failure - Sync
Health - A local worker snapshot. Running describes worker health, not a guarantee that no unseen remote writes exist. Cursors describe repository sync progress.
- Transaction
Execute Builder - Configures one SQL statement inside an explicit transaction.
- Unconfigured
Open LixBuilder - An open request without explicitly selected storage. Supplying only a server opens remote execution; supplying storage opens locally.
- Undo
Receipt - Wire
Query Result
Enums§
- Durability
- Persistence boundary required before acknowledging repository writes.
- Merge
Branch Outcome - Nullable
KeyFilter - Open
Phase - Coarse, stable phases suitable for a CLI, loading screen, or logs.
- Result
Column Type - Stable SQL result type exposed at language and protocol boundaries.
- Sync
Health State - Sync
Phase - Value
- Wire
Value
Constants§
- ANONYMOUS_
ACCOUNT_ ID - Fixed author used when a host opens a session without an authenticated account.
- CURRENT_
STORAGE_ FORMAT_ VERSION - Current persisted repository format. Old stores require explicit migration.
- GLOBAL_
BRANCH_ ID - Reserved high UUID sentinel for repository-global state.
- SERVER_
PROTOCOL_ VERSION - SYNC_
PROTOCOL_ VERSION - Current sync wire epoch; obsolete clients are rejected before mutation.
- SYSTEM_
ACCOUNT_ ID - Fixed author for engine-owned initialization and maintenance changes.
Traits§
- Open
Progress Sink - A non-blocking observer for Lix open and automatic migration.
- TryFrom
Value
Functions§
- create_
lix - Creates an empty hosted repository, or a complete copy supplied by
from_lix. - delete_
lix - Deletes a hosted repository. Local copies are unaffected.
- lix_
schema_ definition - lix_
schema_ definition_ json - open_
lix - Starts configuring the primary session for a Lix repository.
- parse_
sql_ script - Parses SQL script boundaries for host inspection using the engine dialect.
- validate_
lix_ path_ segment - Validates one literal segment of a Lix logical filesystem path.
- validate_
lix_ schema - validate_
lix_ schema_ definition