Picodata development team is pleased to announce the availability of the new Tarantool Rust SDK 4.0 version.
Tarantool Rust SDK is an important auxiliary software used to develop third-party Tarantool modules in the Rust programming language. We develop and maintain the API and optimize its usage in certain scenarios.
Here are the most prominent new features:
- fiber::Builder::{start_non_joinable, defer_non_joinable} functions for spawning non-joinable fibers. These functions return the fiber id, if the corresponding api is supported in your Tarantool version. If not, you can use fiber::id, which works on older versions by using lua api. These functions return the new fiber’s id, which can be used to address the fiber using the new fiber::{cancel, wakeup, exists, csw_of, name_of, set_name_of, name_raw} functions. Meanwhile, the old API Fiber is now marked as deprecated due to possible undefined behaviour cases or crashes.
- Cond::wait_deadline and r#async::timeout::{deadline, IntoTimeout::deadline} methods for defining the waiting time based on given deadlines.
- Proc::is_public method, which checks if a stored procedure defined via #[tarantool::proc] has the the pub attribute. The attribute can be assigned or revoked using the new (public = [true|false]) parameter.
- KeyDef::{extract_key, extract_key_raw} methods for extracting keys from tuples. These methods should be used instead of the older Index::extract_key method; the KeyDef object is available using the Index::meta -> index::Metadata::to_key_def sequence. The KeyDef::validate_tuple method was introduced for tuple validation.
- transaction::{is_in_transaction, begin, commit, rollback} functions for low-level transaction handling in cases when the older transaction::transaction function is not appropriate.
Also, the new Tarantool Rust SDK 4.0 introduces a few small changes that break compatibility with previous versions. We are sorry for this inconvenience 🫣! In particular:
- TcpStream::close_token method was removed.
- Index::extract_key method is marked as unsafe.
- new variants were added to enum Error while traits based on external libraries (clap and num_traits) were removed.
See the full list of changes in CHANGELOG.md
Tarantool is a DBMS and computing platform that runs resident in RAM. This is a fast, reliable and highly scalable basis for building distributed systems with the business logic that the client needs. The Picodata software uses a revised and improved version of Tarantool to create storage clusters and run data processing applications written in Rust.