To find the state of this project's repository at the time of any of these versions, check out the tags.
- Change Log
- [2.0.0] Unreleased
- Added
- Fixed
- Breaking Changes
- [1.1.0] June 16 2023
- Added
- Fixed
- Changed
- [1.0.0] May 29 2023
- Added
- Changed
- Fixed
- Removed
- [0.6.5] Apr 5 2023
- Changed
- Fixed
- [0.6.4] Dec 15 2022
- Added
- Removed
- Fixed
- Changed
- Deprecated
- [0.6.3] Aug 08 2022
- Added
- Fixed
- Changed
- Deprecated
- [0.6.2] Jun 09 2022
- Added
- Fixed
- [0.6.1] Apr 08 2022
- Added
- Fixed
- [0.6.0] Mar 17 2022
- Added
- Changed
- Fixed
- [0.5.1] Dec 24 2021
CHANGELOG.md 20.18 KiB
Change Log
[2.0.0] Unreleased
Added
-
tarantool::log::TarantoolLogger::convert_level
method for converting log::Level to SayLevel taking the mapping function into account. -
tlua::Push
andtlua::LuaRead
implementations forSayLevel
. -
examples/luaopen
example of how to implement native lua modules. -
tarantool::cbus
module for communication between any arbitrary thread and tarantool thread via syncronization primitives (channels) and low-level cbus api. -
tarantool::time::Instant
a custom implementation of std-likeInstant
with more saturating operations and support of thefiber_clock
API. -
r#async::sleep
- an async friendly analog offiber::sleep
.
Fixed
-
log::Log::enabled
implementation for TarantoolLogger no longer ignores the mapping provided at construction. - A copy of fiber name used to leak in
Fiber::new
andFiber::new_with_attr
. -
tarantool::decimal
api is now thread safe, which allows it to be used in concurrent threads.
Breaking Changes
-
transaction::start_transaction
has a more flexible error handling, and is renamed totransaction::transaction
-
fiber::clock
now returnstarantool::time::Instant
-
fiber::time
andfiber::time64
returning non-monotonic time removed. If calendar time is needed, usestd::time::SystemTime
. -
fiber::clock64
removed in favor of a newInstant
basedfiber::clock
API
[1.1.0] June 16 2023
Added
-
vclock::Vclock
data structure representing Tarantool vector clock (box.info.vclock
Lua interface). -
vclock::Lsn
type alias foru64
representing Tarantool log sequence number. -
ToTupleBuffer::tuple_data
method 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 RawBytes
impl Borrow<RawBytes> for RawByteBuf
Fixed
- Doc comments are no longer lost for functions marked with
#[proc]
attribute. - Error when compiling with --no-default-features.
-
cargo test
link failure when a#[::test]
is defined in the same mod with a#[tarantool::proc]
on MacOS.
Changed
- Marked trivial functions with
#[inline]
attributes in mods tuple, index, space.
[1.0.0] May 29 2023
Added
-
fiber::Builder::func_async
andfiber::Builder::proc_async
- methods for easier construction withBuilder
of fibers executingFuture
-
tlua::CFunction
wrapper struct to pushC
functions 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_tester
functions for accessing the global list of test cases. This can be used to implement a custom testing harness. Requires--features=test
. -
test::TestCase
struct which is used internally in#[tarantool::test]
and is returned bytest::test_cases
. Requires--features=test
. -
ffi::tarantool::Proc
type alias for a tarntool stored C function. -
proc::all_procs
helper function which returns a global slice ofproc::Proc
- descriptions for stored procedures defined with#[tarantool::proc]
. -
proc::module_path
helper function for getting a path to the dynamically linked object file in which the given symbol is defined. -
msgpack::ArrayWriter
helper struct for generating msgpack arrays from arbitrary serializable data. -
msgpack::ValueIter
helper struct for iterating over msgpack values. -
tarantool::network::client
alternative async network client. -
tarantool::network::client::reconnect
reconnecting async network client based onnetwork::client
. -
tarantool::network::protocol
sans-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::Error
enum withExpired
andFailed
vairants. -
r#async::timeout::Result<T, E>
type alias forstd::result::Result<T, r#async::timeout::Error<E>>
-
Space::from_id_unchecked
unsafe function, for creating a space struct from a space id. -
Index::from_ids_unchecked
unsafe function, for creating a index struct from space and index ids. -
examples/tokio-hyper
example of using tarantool with tokio + hyper -
std::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_get
method for checking which error happened. -
fiber::r#async::Mutex
an async Mutex, with guard that can be held across await points. -
TarantoolError::message()
method for getting just the error message. -
T::as_cstr
method returning std::ffi::CStr is now implemented for enums defined withtarantool::define_str_enum
. -
T::values
method returning a static slice of static str variant names is now defined for enums defined withtarantool::define_str_enum
. -
index::Metadata
struct representing tuples stored in_index
system space. -
Index::meta
method for getting index metadata from_index
system space. -
Index::id
&Index::space_id
accessor methods for getting ids. -
tuple::KeyDefPart
helper struct for constructingtuple::KeyDef
, it also hastry_from_index_part
constructor method which acceptsindex::Part
. -
IndexMetadata::to_key_def
method for creating atuple::KeyDef
instance from index metadata. Can be used to compare tuples with a key. -
IndexMetadata::to_key_def_for_key
method for creatingtuple::KeyDef
similar toto_key_def
but is used for comparing just the keys themselves. -
IndexId
andSpaceId
type aliases
Changed
-
r#async::timeout::Timeout
can now only be wrapped around a future which resolves into astd::result::Result<T, E>
and timeout itself now resolves intor#async::timeout::Result
. -
LuaRead
methods now returnWrongType
error in case of failure. -
LuaRead
forTuple
now accepts arbitrary lua tables, not only tuples. -
KeyDef::new
now accepts iterator over references toKeyDefPart
and returns a result. - All functions which take
t: &T
whereT: ToTupleBuffer
, now allowT
to be unsized (?Sized
), e.g.tuple::RawBytes
Fixed
- Performance issue with
fiber::csw()
andfiber::check_yield()
that caused tests failure.
Removed
-
r#async::timeout::Expired
in favor ofr#async::timeout::Error
-
tuple::KeyDefItem
in favor oftuple::KeyDefPart
. -
feature = "schema"
. Now the functionality is supported by default
[0.6.5] Apr 5 2023
Changed
-
TarantoolError
'sDisplay
implementation will no longer lookup the error code in lua in case it's not found inTarantoolErrorCode
enum.
Fixed
- Link errors when
Display::fmt
is called fortarantool::error::Error
from rust unit tests - Used to have wrong crate versions for internal dependencies (tlua, tarantool-proc, etc.)
[0.6.4] Dec 15 2022
Added
-
tarantool::space::UpdateOps
helper struct for use withupdate
&upsert
methods ofSpace
&Index
. impl ToTupleBuffer for TupleBuffer
- serde_bytes::[Des|S]erialize implementations for
TupleBuffer
&RawByteBuf
-
#[derive(Clone, PartialEq, Eq)]
forTupleBuffer
&RawByteBuf
-
Space
&Index
now haveupdate_raw
&upsert_raw
methods 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::Field
now implementsFrom<(S, space::FieldType)>
&From<(S, space::FieldType, IsNullable)>
whereS: Into<String>
, which can be used in thespace::Builder::field
andspace::Builder::format
methods. -
space::IsNullable
helper enum. -
space::Builder::into_parts
&index::Builder::into_parts
for accessing inner structs. -
tlua::LuaRead
,tlua::Push
&tlua::PushInto
derive 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_res
andFrom<TryGet<_, _>> for Result<_, _>
. -
impl [tlua::LuaRead|tlua::Push|tlua::PushOne] for tlua::Object
. -
fiber::Mutex
's methodslock
&try_lock
now 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::proc
documentation 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 testerror
intests/src/tlua/functions_write.rs
for examples. - Add
tlua::Throw
wrapper type for throwing lua errors from an error returned by rust callback. - Doc-comments here and there.
-
fiber::r#yield
function for yielding fibers likewise tarantool LUA api. -
#[derive(Copy)]
for a bunch of light enums includingTarantoolErrorCode
,SayLevel
,SystemSpace
,FieldType
. -
define_str_enum
macro suitable for public use. -
fiber::csw
function for tracking fiber context switches. -
fiber::check_yield
function for easier testing. -
fiber::r#async
module with a simple fiber based async/await runtime. -
fiber::block_on
function 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::oneshot
an async/await oneshot channel (inspired bytokio::sync::oneshot
). -
fiber::r#async::watch
an async/await watch channel (inspired bytokio::sync::watch
). -
fiber::{start_async, defer_async}
for executing a future in a separate fiber.
Removed
-
raft
cfg feature that wasn't finished and will never be. -
tests/test.sh
script for running tests (cargo test
can now be used).
Fixed
-
TupleBuffer
no 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::Void
is now more general which allows more types to be used in contexts liketlua::Lua::set
, etc. -
tests/run_benchmarks.lua
now works again.
Changed
-
TarantoolError::error_code
now returns au32
instead ofTarantoolErrorCode
. -
TarantoolError
'sDisplay
implementation will lookup the error code in lua in case it's not found inTarantoolErrorCode
enum. -
TarantoolErrorCode::NoSuchFieldName
is 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::default
now setsis_local
&is_temporary
tofalse
. -
space::SpaceFieldType
is renamedspace::FieldType
. Andspace::SpaceFieldType
is now a deprecated type alias. -
index::IndexFieldType
is renamedindex::FieldType
. Andindex::IndexFieldType
is now a deprecated type alias. - enums
SpaceEngineType
,space::FieldType
,IndexType
,index::FieldType
&RtreeIndexDistanceType
now 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::field
now acceptsimpl Into<Field>
. -
space::Builder::format
now acceptsimpl IntoIterator<Item = impl Into<Field>>
. -
index::Builder::parts
now acceptsimpl IntoIterator<Item = impl Into<Part>>
. -
space::Field
constructors acceptimpl Into<String>
. -
Space
,Index
,RemoteSpace
&RemoteIndex
mutating methods now don't requireself
to 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 self
requirement 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
tlua
if 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::set
function now has 2 generic parameters instead of 3 (not including lifetime parameters).
Deprecated
-
update_ops
&upsert_ops
methods ofSpace
&Index
are deprecated in favour ofupdate_raw
&upsert_raw
.
[0.6.3] Aug 08 2022
Added
- 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 usingRawBytes
orRawByteBuf
. - 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::decode
method for efficient decoding of the stored procedure arguments. -
tlua::Lua::eval_with
&tlua::Lua::exec_with
method for passing parameters in place of...
when evaluating lua code. -
tlua::Strict
wrapper for reading lua numbers without implicit conversions. -
tlua::CData
wrapper 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::AsCData
trait for user defined types which can represented as luajit cdata. -
tlua::CDataOnStack
for 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
&usize
intlua
. -
Tuple::new
function for creating tuples from anything that can be converted to one. -
Tuple::decode
method for converting tuple into something that implementsDecodeOwned
. -
tarantool::space::clear_cache
function for clearing the cache in case it was invalidated. -
tarantool::space::Space::meta
method for getting space metadata. -
tarantool::net_box::Conn::execute
for executing remote sql queries. -
tarantool::trigger::on_shutdown
function for setting a tarantool on_shutdown trigger. -
tlua::LuaRead
,tlua::Push
&tlua::PushInto
derive macros now support generic structs & enums. -
picodata
cfg feature for compatibility with picodata's tarantool fork. impl From<TupleBuffer> for Vec<u8>
impl From<(u32, FieldType)> for KeyDefItem
Fixed
- 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::LuaRead
implementation forHashMap<K, V>
no longer ignores conversion errors. - Memory leak in
tarantool::set_error!
macro. -
LuaRead
failing for some derived types related to enums with optional variants. -
test/tests.sh
now supports custom cargo target directories.
Changed
- Most tuple accessor methods changed their bounds (used to require
serde::Deserialize
now 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::Decimal
is 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::ln
now returnNone
in case of invalid values instead of panicking. -
KeyDef::new
now accepts a genericimpl IntoIterator<Item=impl Into<KeyDefItem>>
Deprecated
-
AsTuple
trait is now deprecated. User defined types should instead implement the newtarantool::tuple::Encode
trait. And most of the api functions now require the parameters to implementtarantool::tuple::ToTupleBuffer
(implemented forEncode
types by default). -
Tuple::from_struct
is deprecated. UseTuple::new
instead. -
Tuple::as_struct
&Tuple::into_struct
are deprecated. UseTuple::decode
instead.
[0.6.2] Jun 09 2022
Added
-
Conn::call_async
&Conn::eval_async
functions for non-yielding network operations -
Space::find_cached
&Space::index_cached
functions better performance when accessing spaces and indexes -
injected
&custom_ret
arguments fortarantool::proc
attribute macro - builtin trait implementations for a number of types (
Hash
forDecimal
,Decirialize
,Clone
,Debug
for multiple space and index related structs inside)
Fixed
-
decimal!
macro can now be used - fixed memory corruption in
Decimal::to_string
- fixed
is_sync
space option not working - add a blanket impl
AsTuple
for&T
- README typos and other mistakes
- doc tests now pass
- fixed "unused unsafe" warning in
error!
macro
[0.6.1] Apr 08 2022
Added
-
upsert!
macro for operations of different types -
tlua::AsTable
wrapper for pushing/reading rust tuples as lua tables -
#[tarantool::proc]
attribute macro for easy stored procedure definitions
Fixed
-
c_char
related compile errors on systems wherec_char
isunsigned
-
Display
not being implemented for some error types
[0.6.0] Mar 17 2022
Added
Added
-
tlua::Lua::new_thread
&tarantool::lua_state
- ability to set a custom filter for tarantool logger (see
TarantoolLogger::with_mapping
) -
AsTuple
implementation for longer tuples -
CString
&CStr
support in tlua -
update_space
macro for operations of different types tlua::TableFromIter
-
FunctionCtx::as_struct
for streamlined conversions -
std::fmt::Debug
implementations forTuple
,TupleBuffer
& others -
is_nullable
setting for space field formats -
tlua::error
macro for throwing a lua error from a rust callback -
LuaError::WrongType
is returned if a rust callback receives incorrect arguments -
LuaRead
implementation for[T; N]
- space/index creation builder api
- specifying index parts by json path
fiber::Mutex
-
Indexable
,IndexableRW
&Callable
types for working with generic (not just builtin ones) indexable & callable lua values -
AsLua::pcall
for calling rust functions in protected mode capturing any lua exceptions
Changed
- join handles returned by
fiber::
{start
|defer
}[_proc
] now have a lifetime parameter, which allows non-static fiber functions - conversions between
Tuple
,TupleBuffer
andVec<u8>
have been reorganized and made safer - reading
Vec<T>
from lua no longer ignores elements that failed to convert toT
- some
tarantool::tuple
operation signatures have been changed removing unnecessaryResult
s, whenever an error cannot actually happen -
fiber::Channel
only accepts'static
values now
Fixed
-
tlua::push_userdata
no 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
[0.5.1] Dec 24 2021
TODO