Home

Awesome

GridDB Rust Client

Overview

GridDB Rust Client is GridDB client library for Rust Programing Language.

It is developed using GridDB C Client and Rust bindgen.

Operating environment

Building of the library and execution of the sample programs have been checked in the following environment.

OS: Ubuntu 20.04/CentOS 7.9
Rust: 1.62
Clang: >=7
GridDB Server/C Client: 5.0 CE

QuickStart

Preparations

Install rust.

$ curl https://sh.rustup.rs -sSf | sh

Install GridDB Server and C Client.

Install clang.

Build and Run

  1. Execute the command on project directory.
$ cargo build
  1. Use "extern crate griddb_rust;" in Rust source code.

How to run sample

GridDB Server need to be started in advance.

  1. If you build GridDB C Client from source code, set LD_LIBRARY_PATH.
  $ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:<C client library file directory path>
  1. The command to run sample
  $ cargo run --example sample1 <GridDB notification address> <GridDB notification port>
       <GridDB cluster name> <GridDB user> <GridDB password>
  --> Person: name=name01 status=false count=100 lob=[ABCDEFGHIJ]

Function

(available)

(not available)

Please refer to the following files for more detailed information.

Note:

  1. The current API might be changed in the next version.
  2. When you install C Client with RPM or DEB, you don't need to set LD_LIBRARY_PATH.

Community

License

GridDB Rust Client source license is Apache License, version 2.0.