Tarantool Rust SDK 5.0 is out!

Александр Толстой

Picodata development team is pleased to announce the availability of the new Tarantool Rust SDK 5.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. In this version we have reworked some subsystems of the library, adding convenience and flexibility, but we had to break compatibility a bit 🫣. We apologize for the inconvenience!

Here are the most prominent new features:

  • The TarantoolError type has been renamed BoxError (the old name is available as type alias), and new methods file, line, errno, as well as the new constructors (which stores the file name and line number of the call), and with_location have been added, among others. This type can now be retrieved in response to an RPC call made via the network::client or net_box module, allowing for structured error diagnostics from replicas.
  • Stored procedures described using the #tarantool::proc macro attribute now support returning additional error diagnostics (source location and error code) using the new IntoBoxError trait. This change may break some existing code as the trait must now be implemented for all error types returned from stored procedures, however this trait provides default implementations for all methods, which should ease the transition.
  • Added current_level and set_current_level functions to the log module to work with Tarantul’s built-in logger. Also, a family of macros say_info, say_verbose, etc. has been added to work with it, which may be useful in environments without their own logging system.
  • Constructors have been added to the Instant type to replace the old ones. They should be easier to use: now_fiber should be used to calculate timeouts, now_accurate should be used when accuracy is important, for example, when profiling code performance.
  • Added auxiliary objects for security in multi-fiber code: NoYieldsGuard and NoYieldsRefCell.

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.