Releases: mlua-rs/mlua
Releases · mlua-rs/mlua
v0.12.0-rc.1
What's Changed
- Switch to Rust 2024 edition
- Removed
Error::ToLuaConversionErrorvariant as it was unused (and not practically useful) - New modules to group data types:
chunk,debug,error,function,table,string,state,thread,userdata,luau - Support
__todebugstringmetamethod for pretty formatting userdata value (for debugging) - New
MaybeSynctrait that is required for userdata types - Removed lifetime from
BorrowedStrandBorrowedBytes - New
Threadmethods:is_resumable,is_running,is_finished,is_error - Added
Thread::stateto get raw Lua state pointer - Luau
TextRequireris renamed toFsRequirer - GC interface refactor:
Lua::gc_inc/Lua::gc_genis replaced withgc_set_mode - Added
GcIncParamsandGcGenParamsfor GC tuning - New
UserDataMethods::add_method_onceandUserDataMethods::add_async_method_once - Initial Luau integer64 type support
- Changed interface of
Function::wrap/wrap_mut/wrap_asyncto support any Error type - Changed
AnyUserData::type_nameto returnLuaStringinstead - Added
UserDataOwned<T>wrapper to take ownership of userdataTand implementsFromLua
Full Changelog: v0.11.6...v0.12.0-rc.1
v0.11.6
What's Changed
- Lua 5.5 support under the new
lua55feature flag - Luau updated to 0.705+
- Added
AnyUserData::is_proxy - Added
num_params,num_upvalues,is_varargtoFunctionInfo
Full Changelog: v0.11.5...v0.11.6
Lua 5.5 notes
Lua 5.5 support external strings and mlua enable this optimisation for impl IntoLua for String/BString (owned versions to move Drop into Lua).
Also the Lua::create_external_string function allow moving ownership to Lua for any Into<Vec<u8>> types.
v0.11.5
What's Changed
- Luau updated to 0.701
- Added
Lua::set_memory_categoryandLua::heap_dumpfunctions to profile (Luau) memory - Added
Lua::type_metatablehelper to get metatable of a primitive type - Added
Lua::tracebackfunction to generate stack traces at different levels - Added
add_method_once/add_async_method_onceUserData methods (experimental) - Make
AnyUserData::type_namepublic - impl
IntoLuaMultifor&MultiValue
Full Changelog: v0.11.4...v0.11.5
v0.11.4
What's Changed
- Make
Value::to_serializablepublic - Added new
serdeoptiondetect_mixed_tables(to encode mixed array+map tables) - Added
ObjectLike::get_pathhelper (for tables and userdata) for easy access of nested data - Added (experimental)
__namecalloptimization for Luau
Full Changelog: v0.11.3...v0.11.4
v0.11.3
What's Changed
- Added
Lua::yield_withto use ascoroutine.yieldfunctional replacement in async functions for any Lua (see doc examples) - Do not try to yield at non-yielable points in Luau interrupt (#632)
- Added
Buffer::cursormethod (Luau) - Added
Lua::create_buffer_with_capacitymethod (Luau) - Make Lua reference values cheap to clone in Rust (only increments ref count)
- Fix panic on large (>67M entries) table creation
Full Changelog: v0.11.2...v0.11.3
v0.11.2
What's Changed
- Faster stack push for
Variadic<T> - Fix handling Windows paths with drive letter in Luau require (#623) by @piz-ewing
- Make Luau registered aliases ascii case-insensitive (#620)
- Fix deserializing negative zeros
-0.0(#618)
Full Changelog: v0.11.1...v0.11.2
v0.11.1
v0.11.0
What's Changed (since v0.11.0-beta.3)
- Allow linking external Lua libraries in a build script (e.g. pluto) using
externalmlua-sys feature flag Lua::inspect_stacktakes a callback with&Debugargument, instead of returningDebugdirectly- Added
Debug::functionmethod to get function running at a given level Debug::curr_lineis deprecated in favour ofDebug::current_linethat returnsOption<usize>- Added
Lua::set_globalsmethod to replace global environment Table::set_metatablenow returnsResult<()>(this operation can fail in sandboxed Luau mode)impl ToStringreplaced withInto<StdString>inUserDataregistrationValue::as_strandValue::as_string_lossymethods are deprecated (as they are non-idiomatic)- Bugfixes and improvements
Full Changelog: v0.11.0-beta.3...v0.11.0
v0.11.0-beta.3
What's Changed
- Luau in sandboxed mode has reduced options in
collectgarbagefunction (to follow the official doc) Function::deep_clonenow returnsResult<Function>as this operation can fail with OOM- Luau "Require" resolves included Lua files relative to the current directory (#605)
- Fixed bug when finalizing
AsyncThreadon drop (call_asyncmethods family)
Full Changelog: v0.11.0-beta.2...v0.11.0-beta.3
v0.11.0-beta.2
What's Changed
- Lua 5.4 updated to 5.4.8
- Terminate Rust
FuturewhenAsyncThreadis dropped (without relying on Lua GC) - Added
loadstringfunction to Luau - Make
AsChunktrait dyn-friendly - Luau
Requiretrait synced with Luau 0.674 - Luau
Requiretrait methods now can returnErrorvariant (inNavigateErrorenum) - Added
__typetoError's userdata metatable (fortypeoffunction) parking_log/send_guardis moved touserdata-wrappersfeature flag- New
serdefeature flag to replaceserialize(the old one is still available)
Full Changelog: v0.11.0-beta.1...v0.11.0-beta.2