Installation
Cargo (Recommended)
Add TensorDB to your Cargo.toml:
[dependencies]tensordb = "0.28"Or use cargo add:
cargo add tensordbBuild from Source
git clone https://github.com/tensor-db/TensorDB.gitcd TensorDBcargo build --releaseOptional Features
TensorDB supports optional compile-time features for hardware acceleration:
| Feature | Flag | Description |
|---|---|---|
| C++ Acceleration | --features native | Enables C++ acceleration via cxx for hashing, compression, and bloom filters |
| SIMD | --features simd | Hardware-accelerated bloom filters and checksums |
| io_uring | --features io-uring | Linux async I/O for reduced syscall overhead |
# Build with all optional featurescargo build --release --features native,simd,io-uringPython Bindings
pip install tensordbimport tensordb
db = tensordb.open("my_data")db.sql("CREATE TABLE users (id TEXT, name TEXT)")db.sql("INSERT INTO users VALUES ('u1', 'Alice')")results = db.sql("SELECT * FROM users")See the Python integration guide for details.
Node.js Bindings
npm install tensordbconst { Database } = require('tensordb');
const db = Database.open('my_data');db.sql("CREATE TABLE users (id TEXT, name TEXT)");db.sql("INSERT INTO users VALUES ('u1', 'Alice')");const results = db.sql("SELECT * FROM users");See the Node.js integration guide for details.
CLI
The TensorDB CLI provides an interactive SQL shell:
# Build the CLIcargo build --release -p tensordb-cli
# Run it./target/release/tensordb-cli ./my_datatensordb> CREATE TABLE test (id TEXT, value TEXT);OKtensordb> INSERT INTO test VALUES ('k1', 'hello');1 row insertedtensordb> SELECT * FROM test;id | value---+------k1 | helloLicense
TensorDB is licensed under the PolyForm Noncommercial License 1.0.0. You may use it freely for personal, educational, research, and non-commercial purposes. Commercial use requires a paid license — contact us for details.
System Requirements
- Rust: 1.75+ (stable)
- OS: Linux, macOS, Windows
- io_uring: Linux 5.1+ (optional)
- C++ toolchain: Required only for
--features native