Skip to content

API reference

Yoda's exhaustive API reference is the rustdoc-generated HTML — every public type, trait, and method is documented there with feature-gate annotations and intra-doc links.

Online (docs.rs)

The published crate's reference lives at:

Local (offline)

To build the same HTML locally — useful when working from a checkout, or to read docs while offline:

sh
cargo doc --workspace --no-deps --all-features --open

This generates HTML under target/doc/ and opens target/doc/yoda/index.html in your default browser.

For a long-running dev server (refresh in the browser to see edits):

sh
cargo doc --workspace --no-deps --all-features
python3 -m http.server 8000 --directory target/doc
# visit http://localhost:8000/yoda/

For continuous rebuilds while editing docs:

sh
cargo install cargo-watch       # one-time
cargo watch -x 'doc --workspace --no-deps --all-features'

docs.rs parity

To exactly match the rendering docs.rs produces (catches docs.rs-specific quirks):

sh
cargo install cargo-docs-rs     # one-time
cargo +nightly docs-rs -p yoda --open

Python API reference

The Python bindings expose a curated subset of the Rust API. The user-facing surface is documented in this site under Python → API Guide. The Rust-side /// doc comments in python/src/lib.rs are for Rust contributors only — the published Python type stubs (.pyi) are the source of truth for end-users.

Trait contracts

Yoda's extension points are traits in yoda-core:

TraitPurposeImplementors
OltpEngineTransactional read/write backendRusqliteEngine
OlapEngineAnalytical query backendDuckDbEngine, DataFusionEngine
CdcConsumerRead CDC events from a sourceRusqliteCdcProducer, RocksDbCdcLog, TimestampCdcConsumer
SyncEngineApply CDC events to OLAPCdcSyncEngine
QueryRouterDecide OLTP vs OLAP for a SQL stringSqlParserRouter, HeuristicRouter
SourceConnectorSidecar source databaseSQLite + Postgres via connector_arrow

Implement these to plug in a new backend. See the trait docs on docs.rs for the contract details (Send/Sync requirements, # Errors, etc.).

Released under the Apache-2.0 License.