Releases: mlua-rs/mlua
Releases · mlua-rs/mlua
v0.10.1
What's Changed
- Minimal Luau updated to 0.650
- Added Luau native vector library support (this can change behavior if you use
vector
function!) - Added Lua
String::display
method - Improved pretty-printing for Lua tables (#478)
- Added
Scope::create_any_userdata
to create Lua objects from any non-'static
Rust types - Added
AnyUserData::destroy
method - New
userdata-wrappers
feature toimpl UserData
forRc<T>
/Arc<T>
/Rc<RefCell<T>>
/Arc<Mutex<T>>
(similar to v0.9) UserDataRef
insend
mode now uses shared lock ifT: Sync
(and exclusive lock otherwise)- Added
Scope::add_destructor
to attach custom destructors - Added
Lua::try_app_data_ref
andLua::try_app_data_mut
methods - Added
From<Vec>
andInto<Vec>
support toMultiValue
andVariadic
types - Bug fixes and improvements (#477 #479)
New Contributors
v0.10.0
What's Changed
For full changelog see changes in v0.10.0-beta.1
, v0.10.0-beta.2
and v0.10.0-rc.1
versions.
Most notable changes since v0.9
:
- No more
'lua
lifetime Send + Sync
withsend
feature flagLua::exec_raw
helper to execute low-level Lua C API codeLuaNativeFn
/LuaNativeFnMut
/LuaNativeAsyncFn
traits for using inFunction::wrap
- Setting metatable for Lua builtin types (number/string/function/etc)
v0.10.0-rc.1
What's Changed
Lua::scope
is back- Support yielding from hooks for Lua 5.3+
- Support setting metatable for Lua builtin types (number/string/function/etc)
- Added
LuaNativeFn
/LuaNativeFnMut
/LuaNativeAsyncFn
traits for using inFunction::wrap
- Added
Error::chain
method to return iterator over nested errors - Added
Lua::exec_raw
helper to execute low-level Lua C API code - Added
Either<L, R>
enum to combine two types into a single one - Added a new
Buffer
type for Luau - Added
Value::is_error
andValue::as_error
helpers - Added
Value::Other
variant to represent unknown Lua types (eg LuaJIT CDATA) - Added (optional)
anyhow
feature to implementIntoLua
foranyhow::Error
- Added IntoLua/FromLua for OsString/OsStr and PathBuf/Path by @psentee in #459
v0.10.0-beta.2
Notes
mlua is getting close to v0.10 stable release. Send+Sync
works well and hopefully all unsoundness are fixed.
Few (planned) features left:
- Scope support
- Getting/setting metatable for primitives
- Support yielding in hooks for Lua 5.3+ (similar to yielding in Luau interrupt callback)
- Access to raw Lua state (lock protected but unsafe)
Either<A, B>
enum that implementsFromLua
LuaNativeFn
trait to wrap Rust functions with non-tuple args (will be used inFunction::wrap*
)- More code coverage
- (possibly)
IntoLua
derive macro
What's Changed
- Updated
ThreadStatus
enum to includeRunning
andFinished
variants. Error::CoroutineInactive
renamed toError::CoroutineUnresumable
.IntoLua
/IntoLuaMulti
now usesimpl trait
syntax for args (shorten froma.get::<_, T>
toa.get::<T>
).- Removed undocumented
Lua::into_static
/from_static
methods. - Futures now require
Send
bound ifsend
feature is enabled. - Dropped lifetime from
UserDataMethods
andUserDataFields
traits. Compiler::compile()
now returnsResult
(Luau).- Removed
Clone
requirement fromUserDataFields::add_field()
. TableExt
andAnyUserDataExt
traits were combined intoObjectLike
trait.- Disabled
send
feature in module mode (since we don't have exclusive access to Lua). Chunk::set_environment()
takesTable
instead ofIntoLua
type.- Reduced the compile time contribution of
next_key_seed
andnext_value_seed
. - Reduced the compile time contribution of
serde_userdata
. - Performance improvements.
New Contributors
Full Changelog: v0.10.0-beta.1...v0.10.0-beta.2
v0.10.0-beta.1
What's Changed
- Dropped
'lua
lifetime (subtypes now store a weak reference to Lua) - Removed (experimental) owned types
- Make Lua types truly
Send
andSync
(when enablingsend
feature flag) - Removed
UserData
impl for Rc/Arc types ("any" userdata functions can be used instead) Lua::replace_registry_value
takes&mut RegistryKey
Lua::scope
temporary disabled (will be re-added in the next release)
v0.9.7
What's Changed
- Implemented
IntoLua
forRegistryKey
- Mark
__idiv
metamethod as available for Luau - Added
Function::deep_clone()
method (Luau) - Added
SerializeOptions::detect_serde_json_arbitrary_precision
option - Added
Lua::create_buffer()
method (Luau) - Support serializing buffer type as a byte slice (Luau)
- Perf: Implemented
push_into_stack
/from_stack
forOption<T>
- Added
Lua::create_ser_any_userdata()
method
New Contributors
- @getong made their first contribution in #384
- @attila-lin made their first contribution in #388
Full Changelog: v0.9.6...v0.9.7
v0.9.6
Changes:
- Added
to_pointer
function toFunction
/Table
/Thread
- Implemented
IntoLua
for&Value
- Implemented
FromLua
forRegistryKey
- Faster (~5%) table array traversal during serialization
- Some performance improvements for bool/int types
Full Changelog: v0.9.5...v0.9.6
v0.9.5
Changes:
- Minimal Luau updated to 0.609
- Luau max stack size increased to 1M (from 100K)
- Implemented
IntoLua
for refs toString
/Table
/Function
/AnyUserData
/Thread
+RegistryKey
- Implemented
IntoLua
andFromLua
forOwnedThread
/OwnedString
(unstable
feature) - Fixed
FromLua
derive proc macro to cover more cases