Thanks for your interest in contributing.
Prerequisites:
- Rust stable toolchain (
rustup,cargo) - Optional: C++ toolchain (
g++orclang++) for native feature path - Optional: Node.js 18+ for documentation site
Build and test:
# Build (pure Rust, default)
cargo build
# Run all tests (740+ tests across 35 suites)
cargo test --workspace --all-targets
# With C++ acceleration
cargo test --workspace --all-targets --features native
# With SIMD bloom filters
cargo test --features simd
# With io_uring (Linux only)
cargo test --features io-uring
# With Parquet support
cargo test --features parquet
# Lint and format
cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
# Benchmarks
cargo bench --bench comparative
cargo bench --bench multi_engine| Crate | Purpose |
|---|---|
tensordb-core |
Database engine: storage, SQL, facets (~31k lines) |
tensordb-cli |
Interactive shell with TAB completion and output modes |
tensordb-server |
PostgreSQL wire protocol server (pgwire) |
tensordb-native |
Optional C++ acceleration via cxx (behind --features native) |
tensordb-distributed |
Horizontal scaling: shard routing, 2PC transactions, rebalancing |
tensordb-python |
Python bindings via PyO3/maturin |
tensordb-node |
Node.js bindings via napi-rs |
Default workspace members: root, core, cli, server. Python and Node crates are excluded from default builds and require their respective build tools (maturin, npm).
- Pure-Rust first. The pure-Rust path must always be fully functional. Native optimizations stay behind
--features native. - Preserve correctness. Bitemporal + MVCC semantics are the core guarantee. Don't break temporal invariants.
- Test your changes. Add tests for behavioral changes, especially for WAL, recovery, temporal filters, SQL semantics, and write path.
- Keep it simple. Don't add abstractions for single-use cases. Don't add error handling for scenarios that can't happen.
- Don't over-document. Add comments only where the logic isn't self-evident. Don't add docstrings to code you didn't change.
cargo fmt --all --checkpassescargo clippy --workspace --all-targets -- -D warningspassescargo test --workspace --all-targetspassescargo test --workspace --all-targets --features nativepasses (if C++ toolchain available)- New or updated tests cover the change
- No generated artifacts committed (
target/,data/,bench_runs/,overnight_runs/)
- Follow existing patterns in the codebase
- Use
thiserrorfor error types - Keep modules focused — one concern per file
- Prefer
Arc<T>for shared ownership,RwLockfor read-heavy shared state - Use
crossbeam_channelfor inter-thread communication - SQL metadata under
__meta/prefix
cd docs && npm install && npm run dev
# Opens at http://localhost:4321
# Production build
cd docs && npm run build