24 stable releases

2.28.0-rc0 Apr 16, 2024
2.27.0 Mar 23, 2024
2.26.6 Feb 16, 2024
2.26.6-rc1 Jan 30, 2024
2.24.5 Sep 30, 2023

#591 in Database interfaces

Download history 26/week @ 2024-01-08 8/week @ 2024-01-29 126/week @ 2024-02-12 15/week @ 2024-02-19 34/week @ 2024-02-26 75/week @ 2024-03-11 151/week @ 2024-03-18 4/week @ 2024-03-25 23/week @ 2024-04-01 377/week @ 2024-04-15

487 downloads per month

Apache-2.0

440KB
7.5K SLoC

TypeDB Rust Driver

Factory Discord Discussion Forum Stack Overflow Stack Overflow

Driver Architecture

To learn about the mechanism that a TypeDB Driver uses to set up communication with databases running on the TypeDB Server, refer to the Clients Overview.

The TypeDB Driver for Rust provides a fully async API that supports multiple async runtimes or a synchronous interface gated by the sync feature.

API Reference

To learn about the methods available for executing queries and retrieving their answers using Driver Rust, refer to the API Reference.

Quickstart

  1. Import typedb-driver through Cargo:
cargo add typedb-driver
  1. Make sure the TypeDB Server is running.
  2. See rust/tests/integration for examples of usage.

Build from Source

Note: You don't need to compile TypeDB Driver from source if you just want to use it in your code. See the "Quickstart" section above.

  1. Make sure you have Bazel installed on your machine.

  2. Build the library:

    a) to build the native/raw rlib:

    bazel build //rust:typedb_driver
    

    The rlib will be produced at: bazel-bin/libtypedb_driver-{hash}.rlib.

    b) to build the crate for a Cargo project:

    bazel build //rust:assemble_crate
    

    The Cargo crate will be produced at:

    bazel-bin/assemble_crate.crate
    

    You can then unzip this crate to retrieve Cargo.toml. Please note: this process has not yet been thoroughly tested. The generated Cargo.toml may not be fully correct. See the Cargo.toml of the typedb-driver crate for reference.

Dependencies

~21–32MB
~584K SLoC