Skip to main content

Crate lix

Crate lix 

Source
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.
BranchId
CallbackOpenProgressSink
Adapts a Rust closure to OpenProgressSink.
CanonicalPluginKey
CanonicalSchemaKey
CommitReceipt
The durable result of committing one transaction.
CommitSpan
The active-branch commits a write moved between.
CreateBranchOptions
Options for creating a new branch from the session’s active branch.
CreateBranchReceipt
Receipt returned after creating a branch.
CreateLixBuilder
Configures explicit hosted creation. The URL addresses a host, not a repository.
DeleteLixBuilder
ExecuteBatchBuilder
Configures one atomic SQL batch execution.
ExecuteBatchResult
Statement results and the single durable transition published by their batch.
ExecuteBatchStatement
One SQL statement to execute as part of an atomic batch.
ExecuteBuilder
Configures one SQL statement execution.
ExecuteResult
Result of executing one SQL statement through engine.
FileId
HostedLix
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
MergeBranchOptions
Options for merging another branch into this session’s active branch.
MergeBranchPreview
MergeBranchPreviewOptions
Options for previewing a merge from another branch into this session’s active branch.
MergeBranchReceipt
Receipt returned after merging a branch.
MergeChangeStats
ObserveEvent
ObserveEvents
A live query observation bound to the local storage session.
OpenAnotherSessionBuilder
Configures another independent session for an open Lix repository.
OpenLixBuilder
Configures a session after local storage has been explicitly selected.
OpenLixFromSnapshotBuilder
Restores a snapshot into fresh storage and then opens the resulting Lix.
OpenMigrationReport
The migration performed by this open, if any.
OpenProgress
One Lix-open progress snapshot.
OpenReport
Immutable facts about how this handle was opened.
RedoReceipt
RemoteExecuteBatchBuilder
Configures an atomic SQL batch on the server.
RemoteExecuteBuilder
Configures execution on a remote repository.
RemoteLix
A repository whose operations execute on its server.
RemoteLixTransaction
A transaction executing on the remote repository.
RemoteObserveEvents
Observation events streamed from the remote repository.
RemoteOpenAnotherSessionBuilder
Configures an independent remote session.
RemoteOpenLixBuilder
An open request with a server but no explicitly selected local storage.
RemoteTransactionExecuteBuilder
Configures SQL executed inside a remote transaction.
ReplicaRecoveryBlob
ReplicaRecoveryBranch
ReplicaRecoveryExport
ReplicaRecoveryFile
ReplicaRecoveryReceipt
ReplicaRecoveryRow
ReplicaRecoverySource
ResultRowRef
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.
ServerOptions
Connection information for a hosted Lix repository.
SessionTransaction
SharedStr
Immutable UTF-8 backed by a cheaply cloned byte buffer.
SqlQueryResult
SqlScriptPlan
Parsed statement and parameter boundaries produced by parse_sql_script.
SqlScriptStatement
One executable statement in a parsed SQL transaction script.
SwitchBranchOptions
Options for switching a session to another branch.
SwitchBranchReceipt
Receipt returned after switching to another branch.
SyncFailure
SyncHealth
A local worker snapshot. Running describes worker health, not a guarantee that no unseen remote writes exist. Cursors describe repository sync progress.
TransactionExecuteBuilder
Configures one SQL statement inside an explicit transaction.
UnconfiguredOpenLixBuilder
An open request without explicitly selected storage. Supplying only a server opens remote execution; supplying storage opens locally.
UndoReceipt
WireQueryResult

Enums§

Durability
Persistence boundary required before acknowledging repository writes.
MergeBranchOutcome
NullableKeyFilter
OpenPhase
Coarse, stable phases suitable for a CLI, loading screen, or logs.
ResultColumnType
Stable SQL result type exposed at language and protocol boundaries.
SyncHealthState
SyncPhase
Value
WireValue

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§

OpenProgressSink
A non-blocking observer for Lix open and automatic migration.
TryFromValue

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