#tarantool #api #async #protocols

rusty_tarantool

Tarantul async client based on tokio framework

17 releases

0.3.0 May 1, 2022
0.2.11 Dec 5, 2022
0.2.10 Jun 23, 2020
0.2.3 Mar 8, 2020
0.1.1 Sep 3, 2018

#1959 in Asynchronous

Download history 206/week @ 2026-01-18 127/week @ 2026-01-25 176/week @ 2026-02-01 119/week @ 2026-02-08 144/week @ 2026-02-15 184/week @ 2026-02-22 224/week @ 2026-03-01 139/week @ 2026-03-08 203/week @ 2026-03-15 167/week @ 2026-03-22 223/week @ 2026-03-29 193/week @ 2026-04-05 362/week @ 2026-04-12 205/week @ 2026-04-19 105/week @ 2026-04-26 102/week @ 2026-05-03

775 downloads per month
Used in 7 crates (4 directly)

Apache-2.0

61KB
1.5K SLoC

Simple Rust client to tarantool

Ported java connector to tarantool db

https://tarantool.io

https://github.com/tarantool/tarantool-java

Overview

Use tokio.io as base client framework

Usage

Latest Version

Example

Call echo stored procedure

run tarantool

cd test-tarantool;tarantool init-tarantool.lua

Lua stored procedure:

function test(a,b)
   return a,b,11
end

Rust client :


println!("Connect to tarantool and call simple stored procedure!");
let client = ClientConfig::new("127.0.0.1:3301", "rust", "rust")
                     .set_timeout_time_ms(2000)
                     .set_reconnect_time_ms(2000)
                     .build();

let response = client
    .prepare_fn_call("test")
    .bind_ref(&("aa", "aa"))?
    .bind(1)?
    .execute().await?;
let res: ((String,String), u64) = response.decode_pair()?;
println!("stored procedure response ={:?}", res);

let response_sql = client
    .prepare_sql("select * from TABLE1 where COLUMN1=?")
    .bind(1)?
    .execute().await?;
    let meta = response.metadata();
    let rows: Vec<(u32, String)> = response.decode_result_set()?;
    println!("resp value={:?}", row);

Output :

Connect to tarantool and call simple stored procedure!
stored procedure response =(("param11", "param12"), (2,), (Some(11),))

On examples part of project you can also see more complicated examples :

hyper http server connecting to tarantool

actix-web example

simple benchmark

Dependencies

~5–7MB
~128K SLoC