Crate tarantool

source ·
Expand description

Tarantool C API bindings for Rust. This library contains the following Tarantool API’s:

Caution! The library is currently under development. API may be unstable until version 1.0 is released.

§Features

  • net_box - Enables protocol implementation (enabled by default)
  • schema - Enables schema manipulation utils (WIP as for now)

§Prerequisites

  • rustc 1.67.1 or newer
  • tarantool 2.2

§Stored procedures

There are several ways Tarantool can call Rust code. It can use either a plugin, a Lua FFI module, or a stored procedure. In this file we only cover the third option, namely Rust stored procedures. Even though Tarantool always treats Rust routines just as “C functions”, we keep on using the “stored procedure” term as an agreed convention and also for historical reasons.

This tutorial contains the following simple steps:

  1. examples/easy - prints “hello world”;
  2. examples/harder - decodes a passed parameter value;
  3. examples/hardest - uses this library to do a DBMS insert;
  4. examples/read - uses this library to do a DBMS select;
  5. examples/write - uses this library to do a DBMS replace.

Our examples are a good starting point for users who want to confidently start writing their own stored procedures.

Re-exports§

Modules§

Macros§

Functions§

  • Create a new lua state with an isolated stack. The new state has access to all the global and tarantool data (Lua variables, tables, modules, etc.).

Type Aliases§

Attribute Macros§

  • #[tarantool::proc] is a macro attribute for creating stored procedure functions.