Other Languages
The Rust crate is the primary API. For other languages, the simplest supported
path is a small wrapper around the installed taidb binary. This avoids hidden
native build steps and works well for local tools, desktop apps, automation,
and batch jobs.
Install the binary once:
cargo install taidbRun the bridge examples:
node examples/node/cli.mjspython3 examples/python/cli_bridge.pygo run examples/go/cli_bridge.goruby examples/ruby/cli_bridge.rbphp examples/php/cli_bridge.phpsh examples/bash/cli_bridge.shjavac -d /tmp/taidb-java examples/java/CliBridge.java && java -cp /tmp/taidb-java CliBridgeOr run the full smoke set:
make language-smokePattern
Section titled “Pattern”Every bridge follows the same shape:
- Store the database path in application config.
- Call
taidb put,taidb get,taidb vector-put, ortaidb vector-search. - Check the process exit status.
- Keep high-frequency hot paths in Rust or native FFI when process startup overhead matters.
When to use native FFI
Section titled “When to use native FFI”Use native FFI only when you need lower latency than process spawning can provide and you are ready to ship platform-specific shared libraries. See the Native FFI reference for Python, Go, TypeScript/Deno, and C examples.