- Add lock_timeout in fiber::Mutex to wait no more than needed
- Introduced
AuthMethod::ScramSha256for a new auth method in Picodata.
-
Unpinned the version of
linkmecrate (0.3.29->0.3). -
Replaced dependency from unmaintained
dlopencrate tolibloadingof version0.3. -
Replaced dependency from unmaintained
proc-macro-errorcrate toproc-macro-error2of version2.
- Unpinned the version of
timecrate from a two-year old0.3.17 space::Space::bsizenow returnsbox.space.<space_name>:bsize()instead ofbox.space.<space_name>.index[0]:bsize()
- As of RUSTSEC-2025-0052, async-std is not supported or maintaned anymore. We've removed this package as the dependency, it's re-exports, and the same with the implicit feature flag it added to the workspace.
network::protocol::Config::cluster_uuidoptional field. When set, the client sends anIPROTO_IDmessage carrying thiscluster_uuidimmediately after greeting. This enables clients to ensure they connect only to an instance from the same cluster.- Added TLS support for iproto client (via new
TlsStream).
- Handshake may include an ID phase before auth when
cluster_uuidis provided. If a vanilla Tarantool responds toIPROTO_IDwithER_INVALID_MSGPACK, the client ignores it for compatibility and proceeds with authentication/ready state.
- Unpinned the version of
tokiocrate optional dependency
- Fix
tlua::Push,tlua::PushIntoandtlua::LuaReadderive macros to support default values for type parameters, andtlua::LuaReadto support default values for default values for const parameters.
- Split a single
index::Parttype intoPart<String>,Part<u32>andPart<NumOrStr>, depending on the accepted/returned types by the tarantool API
AuthMethod::DEFAULTrepresents the default value ofAuthMethod, but is available in constant contexts.- Support MsgPack ExtType encoding and decoding via
ExtStruct - Support Tuple msgpack decoding
- Support Decimal, UUID, Datetime msgpack encoding and decoding
- 1.82 is now MSRV.
network::protocol::codec::Header::encodewill not truncate tou8annetwork::protocol::codec::IProtoTypeinteger from an outside stream at decoding.
- Use
extern "C-unwind"instead ofextern "C"for lua ffi functions, which seems to help with lua_error!() in release builds on recent versions of rust.
ffi::sql::PortCeither allows to append tuples and msgpacks to the port or to iterate over the port data. It is also possible to manipulate withPortCfrom theFunctionCtxof the called function.- Introduce
sql::sql_execute_into_portandsql::Statement::execute_into_portmethods. Now it is possible to store SQL results directly into the port.
AuthMethod::default()is nowMd5, notChapSha1.tarantool::tuple::Tuple::{as_named_buffer, names, name_count}did not find their use, so they are now logging an error message and panic. These functions are scheduled for removal in next major release and labeled as deprecated.
network::client::tcp::TcpStreamnot supports async connection, provided withconnect_asyncandconnect_timeout_asyncmethodsimpl Default for log::TarantoolLogger
error::Resulttype alias now has another generic parameter E, which defaults totarantool::error::Error, but allows this type alias to be used as a drop in replacement fromstd::result::Result.
network::client::tcp::TcpStreamdoes not close underlying fd anymore. Now fd will be closed only when the last copy of tcp stream is dropped.
network::client::tcp::UnsafeSendSyncTcpStreamis now deprected.network::client::tcp::TcpStreamshould be used instead.
tlua::Pushtrait implementations forOsString,OsStr,Path,PathBuftlua::LuaReadtrait implementations forOsString,PathBuf- tlua::LuaTable::metatable which is a better alternative to the existing
tlua::LuaTable::get_or_create_metatable ffi::tarantool::box_schema_versionandffi::tarantool::box_session_idfunctionsnetwork::protocol::SyncIndex::getmethodnetwork::protocol::codec::{LegacyCall, Nop, Prepare, Begin, Commit, Rollback}variantsnetwork::protocol::codec::Header::encode_from_partsfunctionnetwork::protocol::codec::Header::{encode, decode}functionsnetwork::protocol::codec::iproto_key::SQL_INFOconstant- Added optional field
connect_timeouttonetwork::protocol::Config. Used innetwork::client::Client::connect_with_configfor restricting time connection establishment. - Untagged enum represention as in serde with
#[encode(untagged)]attribute tlua::Nilnow supports (de)serialization via serde
network::protocol::codec::IProtoTypeuses C language representationcbus::sync::std::ThreadWakernow uses internal thread FIFO queue when blocking threads on send.#[tarantool::proc]attribute doesn't add procs to a global array unlessstored_procs_slicefeature is enabled.proc::all_procswill now panic ifstored_procs_slicefeature is disabled.
tlua::{Push, PushInto, LuaRead}now work for HashSet & HashMap with custom hashers.- Use after free in
fiber::Builder::start_non_joinablewhen the fiber exits without yielding. - Incorrect, off-spec MP Ext type: caused runtime errors on some platforms.
- Panic in coio test starting from 1.80 Rust.
- Impossible to use procedural macros(like
tarantool::proc,tarantool::test) through reexporting tarantool.
- tlua::LuaTable::get_or_create_metatable is deprecated now in favor of tlua::LuaTable::metatable.
- Use
extern "C-unwind"instead ofextern "C"for all trampolines which take*mut ffi::lua_State(checked withrg 'extern "C".*lua_State').tlua::error!throws an exception to unwind the stack, hence we need to use a proper ABI to fix UB in picodata.
- Add session ID to the argument list of the
sql_prepare_ext. - Replace
sql_unpreparewithsql_unprepare_ext(contains an additional session ID argument).
say_info,say_verbose,say_debug,say_warn,say_crit,say_error,say_fatal,say_sys_errormacros for basic logging into the tarantool's default logger. Use these when you need to log messages, but don't have any facilities set up for this, e.g. internally in tarantool-module code.log::{current_level, set_current_level}for setting/getting current log level of the default logger without going through lua.error::Error::ConnectionClosedvariant which can happen when converting from errors returned fromnetwork::client.tlua::as_tablemacro for more straight-forward creation of lua tables compared to nakedtlua::AsTable.fiber::NoYieldsGuardhelper struct for scope-level guarding against yields. Can be used to assert that a function or it's portion must not yield.fiber::NoYieldsRefCella RefCell replacement for fiber-safety. Will cause a panic if a value is borrowed across yields. Also displays the source location of the last borrow unlike the standard RefCell.Tuple::to_vecmethod to get raw msgpack bytes fromTuple.BoxError::{file, line, errno, cause, fields}methods for getting the corresponding info from the tarantool error (currently only work for remote errors).BoxError::{new, with_location}constructors useful for returning structured error info from stored procedures.BoxError::set_lastmethod for setting the info about the last error in the current fiber. Useful for returning structured error info from stored procedures.error::set_last_errorfunction. It's similar totarantool::set_error!macro, but the new function also supports specifying an explicit source location, while the old macro always uses the caller's location.error::IntoBoxErrortrait. Implement this for your error types to return structured error info from stored procedures defined with#[tarantool::proc], or just useBoxErrordirectly.network::client::tcp::TcpStream::connect_timeoutmethod.- Now
testattribute supports adding a compile time conditional expression for theshould_panicargument, i.e.#[tarantool::test(should_panic = cfg!(debug_assertions))] anyhowfeature that addsIntoBoxErrorimpl foranyhow::Errorsoanyhow::Resultcould be returned from the stored proc.tarantool::time::INFINITYreexport fromtarantool::clock::INFINITYfor convenience.tarantool::time::Instant::{now_fiber, now_accurate}methods with more descriptive names then before. Usenow_fiberwhen computing timeouts, usenow_accuratewhen benchmarking.#[encode(as_raw)]on struct fields and enum variants withVec<u8>type, representing raw MessagePack.- added
Decimal::into_rawfunctions - added
Tuple::as_ptrfunctions - Custom Encode/Decode allows skipping
Optionfields - added support for zero-copy string decoding
via
tarantool::msgpack::encode::Decodetrait as&str. serde_bytes::Deserializeimplementation forTuple.TupleFormat::as_ptrmethod.
tarantool::error::TarantoolErroris renamedBoxError. The old name is still available via a type alias, and is not yet deprecated so as not to break too much code, but in future it will be deprecated.network::client::{Client, ReconnClient}::sendnow returns one of the new error variants:ConnectionClosed,RequestEncode,ResponseDecodeorErrorResponse.tarantool::error::Error::Remotevariant is no longer disabled without thenet_boxfeature.tarantool::set_error!macro will now use the caller's location, so if it's called from a function marked#[track_caller], the log message will contain that function's call site, instead of the location of the macro call itself.Decimaltype is now backed by builtin tarantool decimal implementation. The only expected difference is slight change in formatting (lack of scientific notation).- datetime
from_ffi_dtandas_ffi_dtfunctions now public DecodeErrorhas now better error messages with report of deeply nested values and actual MessagePack type is reported at type mismatch.schema::space::generate_space_idis now public function.
- tests on macos
- Used to panic when implicitly converting a 64-bit integer to a
Decimalinside an arithmetic operation, due to global context contention. network::ReconnClient::with_configconstructor now haspubvisibility, so it's now possible to use it with non-default credentials.- Bug in legacy
net_boxclient which resulted in a deadlock when receiving an error during authentication. - Bug in legacy
net_boxclient which resulted in a deadlock when sending requests after receiving a previous error response. - Use after free when calling
BoxError::error_typein some cases. - Bug in
define_str_enuminDecodeimplementation - the slice reference was not modified after decoding. tarantool::set_errorused to do undefined behaviour when the message contained formatting sequences of %n sort.- Used to panic when logging messages which contained nul-bytes.
- Pushing
ViaMsgpackdidn't work in release mode. - Enums defined with
define_str_enum!can now deserialize from ownedString. Could be seen when deserializing fromrmpv::Value::String. - Stored procedures defined with
#[tarantool::proc]used to fail to compile with doc-comments on the function parameters. msgpack::skip_valuenow returns error in case there wasn't enough data to skip a msgpack value.- Bug in
Tuple::formatwhich could result in undefined behaviour (aka use after free). tlua::Pushandtlua::PushIntocan now be used on non-empty structs and enums with default values for constant generics.
network::client::Erroris now a deprecated alias fornetwork::ClientErrornetwork::protocol::Erroris now a deprecated alias fornetwork::ProtocolErrornetwork::protocol::ResponseErroris now a deprecated alias forerror::BoxErrorerror::Encodeis now a deprecated alias forerror::EncodeErrortarantool::set_and_get_error!macro is deprecated in favor ofBoxError::new.tarantool::time::Instant::nowis deprecated, now you need to choose betweennow_fiber(likely) andnow_accurate.index::Index::extract_keyis now deprecated because it has a weird interface and semantics. You should usetuple::KeyDef::extract_keyinstead.
BoxError::error_typenow returns a&strinstead ofString.network::protocol::Configstruct is now marked as#[non_exhaustive], so that we can add fields to it in the future without breaking backwards compatibility. Now it should always be constructed like soConfig { foo, bar, ..Default::default() }.network::protocol::codec::encode_authnow takes an additionalauth_methodparameter.network::protocol::{Config, api::Auth}&net_box::options::ConnOptions, now have an additional fieldauth_method.error::{Error, TarantoolErrorCode}&network::client::tcp::Errorenums are now marked as#[non_exhaustive]for future compatibility.- Removed
network::client::Error::{Tcp, Io, Protocol}variants as they were confusing to work with. - Removed
impl From<{TcpError, io::Error, ProtocolError}> for network::client::Error. - Most of the variants from
network::ProtocolErrorwere removed, because they are duplicated with ones intarantool::error::Error, only the unique ones are left. tarantool::error::Error::Protocolnow contains aProtocolErrorwhich is no longer wrapped in anArc.- Methods of
network::protocol::Protocolnow returntarantool::error::Errorinstead ofnetwork::ProtocolError. - Functions in
network::protocol::codecnow returntarantool::error::Errorinstead ofnetwork::ProtocolError. - Remove parameter
limitfrom methodnetwork::client::AsClient::execute, which was never used correctly. - Make
network::client::tcp::TcpStream::connectnon blocking and sync. msgpack::encodeno longer returnsResultas it should not fail.- Stored procedures defined with
#[tarantool::proc]no longer compile with some error return types. Previously error type required only traitstd::fmt::Display, but now it requirestarantool::error::IntoBoxError. This means that most error types from third-party crates are no longer supported, buttarantool::error::Error,Box<dyn Error>& evenStringstill work. tarantool::set_error!macro now returns()instead of-1_i32as it did previouslytarantool::tuple::Tuple::decodedoes not support partial decoding anymore. Also any methods/functions which use rpm_serde have same effect.tarantool::msgpack::encode::Decodenow requires a lifetime parameter.
- Support for
AuthMethod::Ldapinnet_box&network::client. - Support for
AuthMethod::MD5innet_box&network::client. - Expose
box_generate_func_idto generate function identifiers for reserved and default ranges in_funcspace. Tuple::datamethod for getting access to tuple data as a slice of bytes.PartialEq,serde_bytes::Serializeimplementations forTuple.tuple::TupleBuilderhelper struct for creatingTupleinstances with a special experimental rust allocated implementation.TupleFormat::with_rust_allocatorconstructor for the special experimental rust allocated implementation of tuple virtual table.
Tuple::decode&ToTupleBufferimplementation forTupleis now a bit more efficient because one redundant tuple data copy is removed.
- SQL module was totally refactored: all its public structures functions and FFIs have been changed.
impl<E: Into<Error>> From<TransactionError<E>> for Error.transaction::is_in_transaction,transaction::begin,transaction::commit,transaction::rollbackshallow wrappers around corresponding ffi functions. These are useful for specific non-trivial cases, but for most userstransaction::transcationis suitable.space::space_id_temporary_minfunction for getting minimum space id in the fully temporary space id range.msgpack::encodemodule which contains customEncode,Decodetraits and correponding derive macros for serialization to/from msgpack without using serde.FiberIdtype alias.fiber::id,fiber::csw_of,fiber::name,fiber::name_of,fiber::name_rawfiber::set_name,fiber::set_name_of,Fiber::id,Fiber::id_checked,fiber::JoinHandle::id,fiber::JoinHandle::id_checkedfunctions for getting and setting the corresponding properties of fibers andffi::has_fiber_idfunction for checking if the corresponding api is supported in the current tarantool version.fiber::existsfunction for checking if fiber with given id exists.fiber::JoinHandle::cancelfor cancelling the fiber by it's join handle.fiber::JoinHandle::wakeupfor waking up the fiber by it's join handle.fiber::cancelfunction for cancelling the fiber by id.fiber::wakeupfunction for waking up the fiber by id.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 usefiber::id, which works on older versions by using lua api.fiber::Cond::wait_deadlinefor waiting untiltarantool::time::Instantrather than aDuration. Usesfiber::clockinternally.fiber::r#async::timeout::{deadline, IntoTimeout::deadline}for constraining futures with an explicit deadline.util::str_eqfunction for comparing strings at compile time.define_enum_with_introspectionenum for defining enums with some introspection facilities including type-safe conversion from integers andMIN,MAX&VARIANTSassociated constants. For more details see the implementation.define_str_enumnow also usesdefine_enum_with_introspectioninternally so that these enums also have the introspection facilities.Vclock::cmp_ignore_zeromethod for comparing vclocks from different replicas.tarantool::proc::Proc::is_publicattribute which returns true if the stored procedure defined with#[tarantool::proc]has apubvisibility modifier or has an explicit(public = true)attribute.(public = false)also works.tarantool::error::Error::variant_namemethod for getting name of the error variant, because somebody needs this.tarantool::static_assertmacro for adding checks that run at compile time.tuple::KeyDef::{extract_key, extract_key_raw}methods for extracting index keys from tuples.tuple::KeyDef::validate_tuplemethod for checking if tuple contains the index key.impl TryFrom<&index::Metadata> for tuple::KeyDefnetwork::client::tcp::UnsafeSendSyncTcpStreamhack which is necessary to work with third-party async libraries.
define_str_enummacro now also addsmsgpack::{Encode, Decode}implementations.- Fibers created with
fiber::start,fiber::deferand/orfiber::Builderare now always marked as cancellable. On newer versions of tarantool fibers cannot be made non-cancellable, so we explicitly do the same for older versions. tarantool::{c_str, c_ptr}macros now check at compile time if the provided literal contains a nul byte, and therefore they aren'tunsafeanymore.- When spawning fibers via the
fiber::Builderapi if the fiber name contains a nul-byte an error will be returned instead of panicking.
define_str_enumwill no longer produce warning "&without an explicit lifetime name cannot be used here". For more information, see rust-lang/rust#115010.#[tarantool::test]declares a special static variable which is usually invisible to the users, but previously it would have a not so unique name which would sometimes lead to name conflicts with user-defined items. This has been changed and the conflicts are now less likely to occur.- Use after free when catching a panic after a drop of a non-joined join handle. Memory is now leaked instead.
schema::space::create_space,Space::create&space::Builder::createwill no longer yield twice. After recent changes to space id generation we have introduced some race conditions when spaces are created concurrently in separate fibers. Under heavy load this could result in attempts to create spaces with repeating ids. This is now fixed.- Some tests were broken on tarantool builds from master branch.
- Removed an erroneously added print statement from Vclock::ignore_zero.
tlua::error!macro now expands the format even when no arguments are specified. Before thistlua::error!(lua, "{var}")would return error containing literally the message "{var}", but now it will use the value ofvarvariable in the current scope.
tarantool::fiber::Fiberis now deprecated in favour offiber::start,fiber::deferand/orfiber::Builder. This is because old api is among other things unsafe as it may result in crashes or even worse. See doc-comments for more info.
- Remove erroneously added
clap::ArgEnumimplementation forAuthMethod. - Removed deprecated trait
AsTuple - Removed deprecated
Tuplemethodsfrom_struct,as_struct&into_struct - Removed deprecated
FunctionArgsmethodas_struct - enums
TarantoolErrorCode,IteratorType,SayLevel&SystemSpaceno longer implement traitToPrimitive, just useas i32instead. rmplibrary reexport is moved fromtuplemodule tomsgpackmodule.fiber::cswnow returnsu64instead ofi32.- Removed
datetime::Error::ErrorEpochTypeConvertas it's never used. TarantoolErrorCode&SayLevelno longer implementnum_traits::FromPrimitive.tlua::error!macro no longer prepends file:line:column to the error message when called with a single string literal. This used to be done as an optimization because we could do it for free at compile time, but now the code is simpler and the source location was unreliable anyway (didn't take into account#[track_caller]).space::SPACE_ID_MAXconstant's value is decreased by one and now has the same value as in tarantool-3.0. Most likely you shouldn't care about this, but in some rare cases we may forbid you from creating a space with id 0x7fff_ffff.error::Errorenum now contains errors frommsgpack::encodemodule inMsgpackEncodeandMsgpackDecodevariants correspondingly.error::Errorenum now containsOthervariant which can contain an value of a type which implementsError + Send + Synctraits.index::Part::{collation, path}builder methods now take aimpl Into<String>instead ofString. This shouldn't be a problem for you unless you're calling them likePart::path(p.into()), in which case just remove the.into().index::Index::extract_keymethod is now unsafe, because it is unsafe and may cause crashes if called with invalid arguments.network::client::tcp::TcpStreamno longer implementsSend&Synctraits, because it's not safe to use it outside the thread it was created in.- Removed
network::client::tcp::TcpStream::close_tokenmethod &network::client::tcp::CloseTokenstruct using which would invoke undefined behaviour.
- struct
read_view::ReadViewfor opening read views on selected spaces. - Expose
box_access_check_spaceto be able to run access checks on spaces externally - Expose
box_access_check_ddlto be able to run more access checks on spaces, users, roles and functions externally. - ffi logger functions
log_set_formatandlog_default_logger - ffi cord (tarantool thread) functions
current_cord_name,cord_is_main_dont_createandcord_is_main cbus::syncmodule with any thread to cord (TX thread) synchronous channels
- A race condition causing undefined behaviour due to fiber_cond_delete being called outside tx sometimes
- A race condition causing unbounded channel receiver too block the thread forever
- A race condition in cbus unbounded channels when two threads write into one LCPipe
- Changes in the cbus LCPipe api: now
LCPipe::push_messagerequires mutable self reference cbus::unbounded::Sender::sendreturn aResulttype instead of nothingcbus::Messagenow require aSendimplementation on a callback function
- Change tarantool-proc version to fix backwards compatibility
- With the new
async-stdfeature flagnetwork::client::tcp::TcpStreamimplements asyncReadandWritetraits fromasync-stdcrate instead offutures. box.session.suAPI is now supported. When building for picodata withpicodatafeature enabled this API will use C-API directly. When used with vanilla tarantool lua polyfill is used.- New
tarantool::session::user_id_by_nameAPI is available when runningpicodata. - New
AuthDatagenerates authentication data when runningpicodata(a wrapper overbox_auth_data_preparesymbol from the C API). - Authentication methods enum (
AuthMethod) was added to the module. - Method
space::Builder::space_type, fieldSpaceCreateOptions::space_typeand enumSpaceTypewhich is now the primary way of specify the type of space. - Fully-temporary spaces can now be created, destroyed and indexes can be created
for them as well (see
SpaceType::Temporary). This feature requires your tarantool executable to support some low level APIs, you can use the newly addedffi::has_fully_temporary_spacesfunction to check if the required APIs are supported. SystemSpace::as_spacemethod for easier conversion toSpace.schema::space::space_metadatafunctionspace::SPACE_ID_MAXconstant with a value of the maximum possible space id.ViaMsgpackwrapper type for passing values to/from lua by converting them to msgpack first.msgpack::ValueIter::lenmethod which returns array length if it's known.
tarantool::log::sayused to do undefined behaviour when the message contained formatting sequences of %n sort.- performance issues when sending large amounts of data via network::client.
network::client::tcp::TcpStreamwill now always try IPv4 addresses first when connecting.tarantool::session::uidandtarantool::session::euidwhen runningpicodatanow use native C-API instead of calling into Lua.- Updated some doc comments for Space and Index methods.
- Methods
temporary,is_local&is_syncof structspace::Builderare deprecated in favour of new methodspace_type. schema::space::SpaceMetadatais now a deprecated alias ofspace::Metadata.- network::client::tcp::Error variants ResolveAddress & Connect now contain the address for which the corresponding operation has failed.
tarantool::session::uidandtarantool::session::euidnow returnUserIdtype which is an alias foru32. Previouslyisizewas used.SpaceCreateOptionsfieldsis_temporary,is_local&is_syncare removed in favour of new fieldspace_type.
tarantool::log::TarantoolLogger::convert_levelmethod for converting log::Level to SayLevel taking the mapping function into account.tlua::Pushandtlua::LuaReadimplementations forSayLevel.examples/luaopenexample of how to implement native lua modules.tarantool::cbusmodule for communication between any arbitrary thread and tarantool thread via syncronization primitives (channels) and low-level cbus api.tarantool::time::Instanta custom implementation of std-likeInstantwith more saturating operations and support of thefiber_clockAPI.r#async::sleep- an async friendly analog offiber::sleep.SpaceEngineTypevariantsSysView,BlackholeandServicewhich cannot be created by users, but can be deserialized from contents of _space system space.fiber::Builder::defer_ffi&fiber::Builder::defer_lualow-level functions. Users should usefiber::Builder::deferinstead in most cases.
fiber::deferwill now use a more efficient implementation on newer versions of tarantool.
log::Log::enabledimplementation for TarantoolLogger no longer ignores the mapping provided at construction.- A copy of fiber name used to leak in
Fiber::newandFiber::new_with_attr. tarantool::decimalapi is now thread safe, which allows it to be used in concurrent threads.
fiber::start_proc,fiber::defer_proc,fiber::Builder::proc,fiber::Builder::proc_async: in favor offiber::start,fiber::defer, etc. These used to be implemented with optimizations, but now their internals are simplified and unified, so there's now no difference between the "proc" and "non-proc" variants. This may result in minor performance degradation in debug builds, but in release builds there shouldn't be any difference.fiber::UnitJoinHandle,fiber::LuaJoinHandle&fiber::LuaUnitJoinHandleare now just aliases tofiber::JoinHandleand are deprecated.
transaction::start_transactionhas a more flexible error handling, and is renamed totransaction::transactionfiber::clocknow returnstarantool::time::Instantfiber::timeandfiber::time64returning non-monotonic time removed. If calendar time is needed, usestd::time::SystemTime.tlua::PushIterError::TooManyValuesnow stores how many values were attempted to be pushed.<tlua::AsTable as Push>::Errchanged fromPushIterErrortoAsTablePushError.fiber::clock64removed in favor of a newInstantbasedfiber::clockAPIError::Decodenow contains expected rust type and actual incorrect msgpack contents.sql::Statement::executenow returnsError::DecodeRmpValue.- Removed a lot of helper structs and traits from
fibermodule, includingfiber::LuaFiber,fiber::FiberFunc, etc. Users should not have been using those anyway, becausefiber::start,fiber::defer,fiber::Builder::start,fiber::Builder::deferexist. - Changed return types of function which spawn fibers.
Now a single
fiber::JoinHandletype is used everywhere.
vclock::Vclockdata structure representing Tarantool vector clock (box.info.vclockLua interface).vclock::Lsntype alias foru64representing Tarantool log sequence number.ToTupleBuffer::tuple_datamethod which returnsOption<&[u8]>. It's only implemented for wrapper types (TupleBuffer,RawBytes,RawByteBuf) as an optimization to avoid extra copies.impl ToOwned<Owned = RawByteBuf> for RawBytesimpl Borrow<RawBytes> for RawByteBuf
- Doc comments are no longer lost for functions marked with
#[proc]attribute. - Error when compiling with --no-default-features.
cargo testlink failure when a#[::test]is defined in the same mod with a#[tarantool::proc]on MacOS.
- Marked trivial functions with
#[inline]attributes in mods tuple, index, space.
fiber::Builder::func_asyncandfiber::Builder::proc_async- methods for easier construction withBuilderof fibers executingFuturetlua::CFunctionwrapper struct to pushCfunctions as values into lua.#[tarantool::test]macro attribute for defining test functions and adding them into a global list of test cases. Requires--features=test.test::test_cases&test::collect_testerfunctions for accessing the global list of test cases. This can be used to implement a custom testing harness. Requires--features=test.test::TestCasestruct which is used internally in#[tarantool::test]and is returned bytest::test_cases. Requires--features=test.ffi::tarantool::Proctype alias for a tarntool stored C function.proc::all_procshelper function which returns a global slice ofproc::Proc- descriptions for stored procedures defined with#[tarantool::proc].proc::module_pathhelper function for getting a path to the dynamically linked object file in which the given symbol is defined.msgpack::ArrayWriterhelper struct for generating msgpack arrays from arbitrary serializable data.msgpack::ValueIterhelper struct for iterating over msgpack values.tarantool::network::clientalternative async network client.tarantool::network::client::reconnectreconnecting async network client based onnetwork::client.tarantool::network::protocolsans-io (without transport layer) implementation of Tarantool Binary Protocol. Serves as a base fornetwork::client, but can be also used independently by other client implementations.r#async::timeout::Errorenum withExpiredandFailedvairants.r#async::timeout::Result<T, E>type alias forstd::result::Result<T, r#async::timeout::Error<E>>Space::from_id_uncheckedunsafe function, for creating a space struct from a space id.Index::from_ids_uncheckedunsafe function, for creating a index struct from space and index ids.examples/tokio-hyperexample of using tarantool with tokio + hyperstd::ops::Deref<Target = str>implementation for enums defined withtarantool::define_str_enum.Into<&'static str>implementation for enums defined withtarantool::define_str_enum.WrongType::[info|when|actual*|expected*|subtype*]constructor methods to be used in impl LuaRead for user defined types.impl LuaRead for TupleBuffer.LuaTable::try_getmethod for checking which error happened.fiber::r#async::Mutexan async Mutex, with guard that can be held across await points.TarantoolError::message()method for getting just the error message.T::as_cstrmethod returning std::ffi::CStr is now implemented for enums defined withtarantool::define_str_enum.T::valuesmethod returning a static slice of static str variant names is now defined for enums defined withtarantool::define_str_enum.index::Metadatastruct representing tuples stored in_indexsystem space.Index::metamethod for getting index metadata from_indexsystem space.Index::id&Index::space_idaccessor methods for getting ids.tuple::KeyDefParthelper struct for constructingtuple::KeyDef, it also hastry_from_index_partconstructor method which acceptsindex::Part.IndexMetadata::to_key_defmethod for creating atuple::KeyDefinstance from index metadata. Can be used to compare tuples with a key.IndexMetadata::to_key_def_for_keymethod for creatingtuple::KeyDefsimilar toto_key_defbut is used for comparing just the keys themselves.IndexIdandSpaceIdtype aliases
r#async::timeout::Timeoutcan now only be wrapped around a future which resolves into astd::result::Result<T, E>and timeout itself now resolves intor#async::timeout::Result.LuaReadmethods now returnWrongTypeerror in case of failure.LuaReadforTuplenow accepts arbitrary lua tables, not only tuples.KeyDef::newnow accepts iterator over references toKeyDefPartand returns a result.- All functions which take
t: &TwhereT: ToTupleBuffer, now allowTto be unsized (?Sized), e.g.tuple::RawBytes
- Performance issue with
fiber::csw()andfiber::check_yield()that caused tests failure.
r#async::timeout::Expiredin favor ofr#async::timeout::Errortuple::KeyDefItemin favor oftuple::KeyDefPart.feature = "schema". Now the functionality is supported by default
TarantoolError'sDisplayimplementation will no longer lookup the error code in lua in case it's not found inTarantoolErrorCodeenum.
- Link errors when
Display::fmtis called fortarantool::error::Errorfrom rust unit tests - Used to have wrong crate versions for internal dependencies (tlua, tarantool-proc, etc.)
tarantool::space::UpdateOpshelper struct for use withupdate&upsertmethods ofSpace&Index.impl ToTupleBuffer for TupleBuffer- serde_bytes::[Des|S]erialize implementations for
TupleBuffer&RawByteBuf #[derive(Clone, PartialEq, Eq)]forTupleBuffer&RawByteBufSpace&Indexnow haveupdate_raw&upsert_rawmethods that accept serialized arguments.space::FieldType::Varbinary,space::FieldType::Datetime,space::FieldType::Interval,space::FieldType::Map.tarantool::Space::Field::varbinary,tarantool::Space::Field::datetime,tarantool::Space::Field::interval,tarantool::Space::Field::map.index::FieldType::Datetime.impl Debug for Index.space::Fieldnow implementsFrom<(S, space::FieldType)>&From<(S, space::FieldType, IsNullable)>whereS: Into<String>, which can be used in thespace::Builder::fieldandspace::Builder::formatmethods.space::IsNullablehelper enum.space::Builder::into_parts&index::Builder::into_partsfor accessing inner structs.tlua::LuaRead,tlua::Push&tlua::PushIntoderive macros now support new-type style tuple structs: they are treated as the inner type.impl tlua::PushInto for Tuple.net_box::promise::TryGet::into_resandFrom<TryGet<_, _>> for Result<_, _>.impl [tlua::LuaRead|tlua::Push|tlua::PushOne] for tlua::Object.fiber::Mutex's methodslock&try_locknow will log the location of last successful lock when built withdebug_assertions.#[track_caller]added to tlua functions that can panic.- A clarification in
tarantool::procdocumentation about the safety of using borrowed arguments. impl LuaRead for StaticLua: this is mainly useful for capturing the lua context passed to rust-callbacks for example for use withtlua::error!. See testerrorintests/src/tlua/functions_write.rsfor examples.- Add
tlua::Throwwrapper type for throwing lua errors from an error returned by rust callback. - Doc-comments here and there.
fiber::r#yieldfunction for yielding fibers likewise tarantool LUA api.#[derive(Copy)]for a bunch of light enums includingTarantoolErrorCode,SayLevel,SystemSpace,FieldType.define_str_enummacro suitable for public use.fiber::cswfunction for tracking fiber context switches.fiber::check_yieldfunction for easier testing.fiber::r#asyncmodule with a simple fiber based async/await runtime.fiber::block_onfunction for executing a Future on a fiber based async/await runtime.fiber::r#async::timeout::{timeout, IntoTimeout}utilities for constraining futures with a timeout (only works with the fiber based async/await runtime!).fiber::r#async::oneshotan async/await oneshot channel (inspired bytokio::sync::oneshot).fiber::r#async::watchan async/await watch channel (inspired bytokio::sync::watch).fiber::{start_async, defer_async}for executing a future in a separate fiber.
raftcfg feature that wasn't finished and will never be.tests/test.shscript for running tests (cargo testcan now be used).
TupleBufferno longer copies data into tarantool's transaction memory pool inTupleBuffer::from_vec_unchecked, which previously would result in a use after free in some cases.impl<_> From<tlua::PushIterError<_>> for tlua::Voidis now more general which allows more types to be used in contexts liketlua::Lua::set, etc.tests/run_benchmarks.luanow works again.
TarantoolError::error_codenow returns au32instead ofTarantoolErrorCode.TarantoolError'sDisplayimplementation will lookup the error code in lua in case it's not found inTarantoolErrorCodeenum.TarantoolErrorCode::NoSuchFieldNameis renamedTarantoolErrorCode::NoSuchFieldNameInSpace.TarantoolErrorCode::BootstrapReadonly's value changed from 201 to 203.update!&upsert!macros are now more efficient due to the use ofupdate_raw&upsert_raw.SpaceCreateOptions::defaultnow setsis_local&is_temporarytofalse.space::SpaceFieldTypeis renamedspace::FieldType. Andspace::SpaceFieldTypeis now a deprecated type alias.index::IndexFieldTypeis renamedindex::FieldType. Andindex::IndexFieldTypeis now a deprecated type alias.- enums
SpaceEngineType,space::FieldType,IndexType,index::FieldType&RtreeIndexDistanceTypenow all- implement
Display, - implement
std::convert::AsRef<str>&std::convert::Into<String>, - implement
std::str::FromStr, - implement
tlua::Push,tlua::PushInto,tlua::LuaRead. - have a
const fn as_str.
- implement
space::Builder::fieldnow acceptsimpl Into<Field>.space::Builder::formatnow acceptsimpl IntoIterator<Item = impl Into<Field>>.index::Builder::partsnow acceptsimpl IntoIterator<Item = impl Into<Part>>.space::Fieldconstructors acceptimpl Into<String>.Space,Index,RemoteSpace&RemoteIndexmutating methods now don't requireselfto be borrowed mutably. This is safe, because the only mutation those methods do is confined in the tarantool api, which is robust with respect to what rust mutability rules are supposed to protect from (except for thread safety, which is not supported by any of tarantool apis). Relaxing the&mut selfrequirement greatly increases the api's ease of use with the only downside of added compile warning of "variable does not need to be mutable" which is a small price to pay.- In
tluaif a lua error happens during code evaluation the location in the rust program where the code was created is now displayed in the error, i.e. the location of a call toLua::eval,Lua::exec, etc. will be displayed. tlua::Lua::setfunction now has 2 generic parameters instead of 3 (not including lifetime parameters).
update_ops&upsert_opsmethods ofSpace&Indexare deprecated in favour ofupdate_raw&upsert_raw.
- Tuples can now be used as parameters to functions like
Space::get,Index::get, etc. (impl ToTupleBuffer for Tuple) - Tuple fields can now be read as raw bytes (without deserializing) using
&tarantool::tuple::RawBytes(borrowed) ortarantool::tuple::RawByteBuf(owned) - Tuples can now be efficiently returned from stored procedures defined with
#[proc]macro attribute. (impl Return for Tuple) - Raw bytes can now be returned from stored procedures defined with
#[proc]macro attribute usingRawBytesorRawByteBuf. - Stored procedures defined with
#[proc]macro attribute can now accept borrowed arguments. For example#[proc] fn strlen(s: &str) -> usize { s.len() }now compiles. FunctionArgs::decodemethod for efficient decoding of the stored procedure arguments.tlua::Lua::eval_with&tlua::Lua::exec_withmethod for passing parameters in place of...when evaluating lua code.tlua::Strictwrapper for reading lua numbers without implicit conversions.tlua::CDatawrapper for reading/writing values as luajit cdata. Can be used work with primitve cdata types like numbers and pointers and also user defined structs.tlua::AsCDatatrait for user defined types which can represented as luajit cdata.tlua::CDataOnStackfor working with luajit cdata efficiently within the lua stack. Can be used to read the raw cdata bytes or for passing cdata values into lua functions.- Added support for reading/writing
isize&usizeintlua. Tuple::newfunction for creating tuples from anything that can be converted to one.Tuple::decodemethod for converting tuple into something that implementsDecodeOwned.tarantool::space::clear_cachefunction for clearing the cache in case it was invalidated.tarantool::space::Space::metamethod for getting space metadata.tarantool::net_box::Conn::executefor executing remote sql queries.tarantool::trigger::on_shutdownfunction for setting a tarantool on_shutdown trigger.tlua::LuaRead,tlua::Push&tlua::PushIntoderive macros now support generic structs & enums.picodatacfg feature for compatibility with picodata's tarantool fork.impl From<TupleBuffer> for Vec<u8>impl From<(u32, FieldType)> for KeyDefItem
- Load type failure on tarantool 2.9 and later related to missing access to some internal symbols
- Rust callbacks of
Option<T>failing when called from lua without arguments. tlua::LuaReadimplementation forHashMap<K, V>no longer ignores conversion errors.- Memory leak in
tarantool::set_error!macro. LuaReadfailing for some derived types related to enums with optional variants.test/tests.shnow supports custom cargo target directories.
- Most tuple accessor methods changed their bounds (used to require
serde::Deserializenow requiretuple::Decode) e.g.Tuple::get,TupleIterator::next, etc. This coincidentally means that you can read a tuple's field into aTuple, but you probably don't want that. tarantool::decimal::Decimalis now implemented using the dec crate instead of tarantool built-in decimals (which are based on a patched version of the same decNumber library as the dec crate). This means there are minor changes in decimal's behavior (e.g. they're printed with scientific notation now, etc.) but nothing major.Decimal::log10&Decimal::lnnow returnNonein case of invalid values instead of panicking.KeyDef::newnow accepts a genericimpl IntoIterator<Item=impl Into<KeyDefItem>>
AsTupletrait is now deprecated. User defined types should instead implement the newtarantool::tuple::Encodetrait. And most of the api functions now require the parameters to implementtarantool::tuple::ToTupleBuffer(implemented forEncodetypes by default).Tuple::from_structis deprecated. UseTuple::newinstead.Tuple::as_struct&Tuple::into_structare deprecated. UseTuple::decodeinstead.
Conn::call_async&Conn::eval_asyncfunctions for non-yielding network operationsSpace::find_cached&Space::index_cachedfunctions better performance when accessing spaces and indexesinjected&custom_retarguments fortarantool::procattribute macro- builtin trait implementations for a number of types (
HashforDecimal,Decirialize,Clone,Debugfor multiple space and index related structs inside)
decimal!macro can now be used- fixed memory corruption in
Decimal::to_string - fixed
is_syncspace option not working - add a blanket impl
AsTuplefor&T - README typos and other mistakes
- doc tests now pass
- fixed "unused unsafe" warning in
error!macro
upsert!macro for operations of different typestlua::AsTablewrapper for pushing/reading rust tuples as lua tables#[tarantool::proc]attribute macro for easy stored procedure definitions
c_charrelated compile errors on systems wherec_charisunsignedDisplaynot being implemented for some error types
Added
tlua::Lua::new_thread&tarantool::lua_state- ability to set a custom filter for tarantool logger (see
TarantoolLogger::with_mapping) AsTupleimplementation for longer tuplesCString&CStrsupport in tluaupdate_spacemacro for operations of different typestlua::TableFromIterFunctionCtx::as_structfor streamlined conversionsstd::fmt::Debugimplementations forTuple,TupleBuffer& othersis_nullablesetting for space field formatstlua::errormacro for throwing a lua error from a rust callbackLuaError::WrongTypeis returned if a rust callback receives incorrect argumentsLuaReadimplementation for[T; N]- space/index creation builder api
- specifying index parts by json path
fiber::MutexIndexable,IndexableRW&Callabletypes for working with generic (not just builtin ones) indexable & callable lua valuesAsLua::pcallfor calling rust functions in protected mode capturing any lua exceptions
- join handles returned by
fiber::{start|defer}[_proc] now have a lifetime parameter, which allows non-static fiber functions - conversions between
Tuple,TupleBufferandVec<u8>have been reorganized and made safer - reading
Vec<T>from lua no longer ignores elements that failed to convert toT - some
tarantool::tupleoperation signatures have been changed removing unnecessaryResults, whenever an error cannot actually happen fiber::Channelonly accepts'staticvalues now
tlua::push_userdatano longer requires arguments implementSend- partially pushed tuples poluting the stack
- assertion violation when trying to create a tuple with incorrect msgpack data
- build for Arm MacOS
TODO