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

bash cd test-tarantool;tarantool init-tarantool.lua

Lua stored procedure: ```lua function test(a,b) return a,b,11 end

```

Rust client :

```rust

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

let response = client .preparecallargs() .addarg(&("aa", "aa"))? .addarg(&1)? .callfn("test").await?; let res: ((String,String), u64) = response.decodepair()?; println!("stored procedure response ={:?}", res);

let responsesql = client .preparecallargs() .addarg(&1)? .execsql("select * from TABLE1 where COLUMN1=?").await?; let row: Vec<(u32, String)> = responsesql.decode()?; println!("resp value={:?}", row);

```

Output :

log 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