bdk_turso 0.2.1

Turso persistence backend for BDK
docs.rs failed to build bdk_turso-0.2.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: bdk_turso-0.2.3

bdk_turso

An experimental persistence backend for bdk_wallet that stores wallet state in Turso.

Crate Info Wallet API Docs CI Status MIT or Apache-2.0 Licensed

Project status

bdk_turso is early-stage and experimental. It currently implements async wallet persistence, and its API may change.

What is bdk_turso?

bdk_turso is a standalone persistence backend for bdk_wallet, storing wallet state in Turso, an in-process, SQLite-compatible database written in Rust. It implements the AsyncWalletPersister trait behind the wallet feature, without changes to bdk_wallet or bdk_persist.

bdk_turso is forked from bdk_sqlite, with its persistence implementation adapted for Turso's async-first API. Its persistence tests are adapted from the test suite in bdk_redb.

Why Turso?

Native async persistence

Turso's async-first design allows bdk_turso to implement AsyncWalletPersister natively rather than wrapping blocking database operations in spawn_blocking. Turso is designed to support concurrent write scaling; this project makes no benchmark claims.

SQLite compatibility

bdk_turso stays within Turso's SQLite-compatible feature subset and avoids Turso-only extensions. Unencrypted database files remain readable by bdk_sqlite; Turso-encrypted files require Turso to open.

Usage

The API is not finalized; this illustrative example shows the intended shape:

use bdk_turso::Store;
use bdk_wallet::{bitcoin::Network, Wallet};

let mut store = Store::new("wallet.sqlite")?;
let wallet = Wallet::new_or_load(
    descriptor,
    change_descriptor,
    Network::Testnet,
    &mut store,
)?;

Feature flags

Feature Description
wallet Enables the AsyncWalletPersister implementation.

Minimum Supported Rust Version (MSRV)

The MSRV is 1.88.0, based on the current resolved dependency graph.

License

Licensed under either of MIT or Apache License, Version 2.0, at your option.

Contribution

Contributions are welcome. Please read the contribution guide, the BDK contributing guidelines, and the BDK community standards.