mlua
High level bindings to Lua 5.5/5.4/5.3/5.2/5.1 (including LuaJIT) and Luau with async/await features and support of writing native Lua modules in Rust.
0.12.0
6.2M downloads/mo
#4066 most downloaded on crates.io
mlua-rs/mlua
What this package is like to depend on
Last release 1 months ago
05 Jul 2026
Ships fairly regularly
a new release about every 4 weeks
Most releases are documented
notes for 52 of 61 stable releases
1 version withdrawn
withdrawn after publishing
7 years old
85 releases · first in 2019
7 releases in the last 12 months
see the full history below
Release timeline
85 releases · Nov 2019 to Jul 2026Releases
latest 60 of 85-
0.12.005 Jul 2026Release notes
Open source →Highlights
More ergonomic UserData building blocks
- Declaratively implement
UserDatawith#[derive(UserData)]and register methods/fields with the new#[mlua::userdata_impl]attribute macro. UserDataOwned<T>wrapper takes ownership of userdata and implementsFromLuaUserDataMethods::add_method_once/add_async_method_once__todebugstringmetamethod for pretty-printing userdata when debuggingMaybeSynctrait for userdata under thesendfeature
Reorganized public API
Types are now grouped into focused modules:
chunk,debug,error,function,table,string,state,thread,userdataandluau.Thread lifecycle callbacks
Hook into coroutine create/resume/yield events across all Lua versions (when using mlua API).
Luau improvements
Latest Luau with extended require-by-string support and JIT options.
Garbage-collector interface refactor
Lua::gc_inc/Lua::gc_genare replaced by aLua::gc_set_mode, withGcIncParams/GcGenParamsfor fine-grained tuning.What's Changed (since v0.12.0-rc.2)
- Crate root re-exports are refactored (only essentials are re-exported, the rest is in the new submodules)
- Added
ThreadStatus::NormalandThread::is_normal(mimiccoroutine.status) - Added
Lua::set_jit_optionswith support of Luau JIT inliner (Luau) - Added
Value::as_vector/Value::is_vector(Luau) - Added
Table::remove serde: tables with the array metatable are always encoded as arrays (incl.detect_mixed_tablesoption)- impl
HashforBorrowedStr/BorrowedBytes Lua::current_threadresolves implicit async threads to their root owner (#706)- Bugfixes and improvements
Full Changelog: v0.11.6...v0.12.0
Release notes
Open source →Changes since v0.12.0-rc.2
- Create root re-exports are refactored (only essentials are re-exported, the rest is in the new submodules)
- Added
ThreadStatus::NormalandThread::is_normal(mimiccoroutine.status) - Added
Lua::set_jit_optionswith support of Luau JIT inliner (Luau) - Added
Value::as_vector/Value::is_vector(Luau) - Added
Table::remove serde: tables with the array metatable are always encoded as arrays (incl.detect_mixed_tablesoption)- impl
HashforBorrowedStr/BorrowedBytes Lua::current_threadresolves implicit async threads to their root owner (#706)- Bugfixes and improvements
- Declaratively implement
-
0.12.0-rc.206 Jun 2026 pre-releaseRelease notes
Open source →The new stable version is almost ready and will be released after some testing
What's Changed
- Add
#[derive(UserData)]and#[userdata_impl]macros - Support thread create/resume/yield callbacks for all Lua versions (including Luau)
- Support
to_alias_override/to_alias_fallbackinRequiretrait (Luau) - Prevent XRc overflow when dropping RawLua with foreign Lua state
- Implement Not for StdLib (#699)
- Fix
String::to_pointerreturnNULLin Lua <5.4
Full Changelog: v0.12.0-rc.1...v0.12.0-rc.2
Release notes
Open source →- Add
#[derive(UserData)]and#[mlua::userdata_impl]macros - Support thread create/resume/yield callbacks for all Lua versions (including Luau)
- Support
to_alias_override/to_alias_fallbackinRequiretrait (Luau) - Prevent
XRcoverflow when droppingRawLuawith foreign Lua state - implement
NotforStdLib(#699) - Fix
String::to_pointerreturn NULL in Lua <5.4
- Add
-
0.12.0-rc.121 Apr 2026 pre-releaseRelease notes
Open source →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
Release notes
Open source →- 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
-
0.11.627 Jan 2026Release notes
Open source →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 moveDropinto Lua).
Also theLua::create_external_stringfunction allow moving ownership to Lua for anyInto<Vec<u8>>types.Release notes
Open source →- Added Lua 5.5 support (
lua55feature flag) - Luau updated to 0.705+
- Added
AnyUserData::is_proxymethod to check if userdata is a proxy - Added
num_params,num_upvalues,is_varargtoFunctionInfo
- Lua 5.5 support under the new
-
0.11.523 Nov 2025Release notes
Open source →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
Release notes
Open source →- 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 - Bugfixes and async perf improvements
-
0.11.429 Sep 2025Release notes
Open source →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
Release notes
Open source →- Make
Value::to_serializablepublic - Add new serde option
detect_mixed_tables(to encode mixed array+map tables) - Add
ObjectLike::get_pathhelper (for tables and userdata)
- Make
-
0.11.330 Aug 2025Release notes
Open source →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
Release notes
Open source →- Add
Lua::yield_withto use ascoroutine.yieldfunctional replacement in async functions for any Lua - Do not try to yield at non-yielable points in Luau interrupt (#632)
- Add
Buffer::cursormethod (Luau) - Add
Lua::create_buffer_with_capacitymethod (Luau) - Make Lua reference values cheap to clone (only increments ref count)
- Fix panic on large (>67M entries) table creation
- Added
-
0.11.210 Aug 2025Release notes
Open source →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
Release notes
Open source →- Faster stack push for
Variadic<T> - Fix handling Windows paths with drive letter in Luau require (#623)
- Make Luau registered aliases ascii case-insensitive (#620)
- Fix deserializing negative zeros
-0.0(#618)
- Faster stack push for
-
0.11.115 Jul 2025Release notes
Open source →What's Changed
- Fixed bug exhausting Lua auxiliary stack and leaving it without reserve (#615)
- Lua::push_c_function now correctly handles OOM for Lua 5.1 and Luau
Full Changelog: v0.11.0...v0.11.1
Release notes
Open source →- Fixed bug exhausting Lua auxiliary stack and leaving it without reserve (#615)
Lua::push_c_functionnow correctly handles OOM for Lua 5.1 and Luau
-
0.11.014 Jul 2025Release notes
Open source →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
Release notes
Open source →Changes 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
- Allow linking external Lua libraries in a build script (e.g. pluto) using
-
0.11.0-beta.323 Jun 2025 pre-releaseRelease notes
Open source →- Luau in sandboxed mode has reduced options in
collectgarbagefunction (to follow the official doc) Function::deep_clonenow returnsResult<Function>as this operation can trigger memory errors- Luau "Require" resolves included Lua files relative to the current directory (#605)
- Fixed bug when finalizing
AsyncThreadon drop (call_asyncmethods family)
- Luau in sandboxed mode has reduced options in
-
0.11.0-beta.212 Jun 2025 pre-releaseRelease notes
Open source →- 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)
-
0.11.0-beta.107 May 2025 pre-releaseRelease notes
Open source →- New "require-by-string" for Luau (with
Requiretrait and async support) - Added
Thread::resume_errorsupport for Luau - 52 bit integers support for Luau (this is a breaking change)
- New features for Luau compiler (constants, disabled builtins, known members)
AsyncThread<A, R>changed toAsyncThread<R>(Apushed to stack immediately)- Lifetime
'amoved fromAsChunk<'a>toAsChunk::source where Self: 'a Lua::scopepass&Scopeinstead of&mut Scopeto closure- Added global hooks support (Lua 5.1+)
- Added per-thread hooks support (Lua 5.1+)
Lua::init_from_ptrrenamed toLua::get_or_init_from_ptrand returns&LuaLua:load_from_functionis deprecated (this isregister_modulenow)- Added
Lua::register_moduleandLua::preload_module
- New "require-by-string" for Luau (with
-
0.10.524 May 2025Nothing published for this version
-
0.10.405 May 2025 withdrawnRelease notes
Open source →- Luau updated to 0.672
- New serde option
encode_empty_tables_as_arrayto serialize empty tables as arrays - Added
WeakLuaandLua::weak()to create weak references to Lua state - Trigger abort when Luau userdata destructors are panic (Luau GC does not support it)
- Added
AnyUserData::type_id()method to get the type id of the userdata - Added
Chunk::name(),Chunk::environment()andChunk::mode()functions - Support borrowing underlying wrapped types for
UserDataRefandUserDataRefMut(underuserdata-wrappersfeature) - Added large (52bit) integers support for Luau
- Enable
serdeforbstrifserializefeature flag is enabled - Recursive warnings (Lua 5.4) are no longer allowed
- Implemented
IntoLua/FromLuaforBorrowedStringandBorrowedBytes - Implemented
IntoLua/FromLuaforchar - Enable
Thread::reset()for all Lua versions (limited support for 5.1-5.3) - Bugfixes and improvements
-
0.10.327 Jan 2025Release notes
Open source →- Set
DefaultforValueto beNil - Allow exhaustive match on
Value(#502) - Add
Table::set_safeenvmethod (Luau)
- Set
-
0.10.201 Dec 2024Release notes
Open source →- Switch proc-macro-error to proc-macro-error2 (#493)
- Do not allow Lua to run GC finalizers on ref thread (#491)
- Fix chunks loading in Luau when memory limit is enforced (#488)
- Added
String::wrapmethod to wrap arbitraryAsRef<[u8]>intoimpl IntoLua - Better FreeBSD/OpenBSD support (thanks to cos)
- Delay "any" userdata metatable creation until first instance is created (#482)
- Reduce amount of generated code for
UserData(less generics)
-
0.10.109 Nov 2024Release notes
Open source →- Minimal Luau updated to 0.650
- Added Luau native vector library support (this can change behavior if you use
vectorfunction!) - Added Lua
String::displaymethod - Improved pretty-printing for Lua tables (#478)
- Added
Scope::create_any_userdatato create Lua objects from any non-'staticRust types - Added
AnyUserData::destroymethod - New
userdata-wrappersfeature toimpl UserDataforRc<T>/Arc<T>/Rc<RefCell<T>>/Arc<Mutex<T>>(similar to v0.9) UserDataRefinsendmode now uses shared lock ifT: Sync(and exclusive lock otherwise)- Added
Scope::add_destructorto attach custom destructors - Added
Lua::try_app_data_refandLua::try_app_data_mutmethods - Added
From<Vec>andInto<Vec>support toMultiValueandVariadictypes - Bug fixes and improvements (#477 #479)
-
0.10.025 Oct 2024Release notes
Open source →Changes since v0.10.0-rc.1
- Added
error-sendfeature flag (disabled by default) to requireSend + SyncforError - Some performance improvements
- Added
-
0.10.0-rc.108 Oct 2024 pre-releaseRelease notes
Open source →Lua::scopeis back- Support yielding from hooks for Lua 5.3+
- Support setting metatable for Lua builtin types (number/string/function/etc)
- Added
LuaNativeFn/LuaNativeFnMut/LuaNativeAsyncFntraits for using inFunction::wrap - Added
Error::chainmethod to return iterator over nested errors - Added
Lua::exec_rawhelper to execute low-level Lua C API code - Added
Either<L, R>enum to combine two types into a single one - Added a new
Buffertype for Luau - Added
Value::is_errorandValue::as_errorhelpers - Added
Value::Othervariant to represent unknown Lua types (eg LuaJIT CDATA) - Added (optional)
anyhowfeature to implementIntoLuaforanyhow::Error - Added
IntoLua/FromLuaforOsString/OsStrandPathBuf/Path
-
0.10.0-beta.207 Sep 2024 pre-releaseRelease notes
Open source →- Updated
ThreadStatusenum to includeRunningandFinishedvariants. Error::CoroutineInactiverenamed toError::CoroutineUnresumable.IntoLua/IntoLuaMultinow usesimpl traitsyntax for args (shorten froma.get::<_, T>toa.get::<T>).- Removed undocumented
Lua::into_static/from_staticmethods. - Futures now require
Sendbound ifsendfeature is enabled. - Dropped lifetime from
UserDataMethodsandUserDataFieldstraits. Compiler::compile()now returnsResult(Luau).- Removed
Clonerequirement fromUserDataFields::add_field(). TableExtandAnyUserDataExttraits were combined intoObjectLiketrait.- Disabled
sendfeature in module mode (since we don't have exclusive access to Lua). Chunk::set_environment()takesTableinstead ofIntoLuatype.- Reduced the compile time contribution of
next_key_seedandnext_value_seed. - Reduced the compile time contribution of
serde_userdata. - Performance improvements.
- Updated
-
0.10.0-beta.131 Jul 2024 pre-releaseRelease notes
Open source →- Dropped
'lualifetime (subtypes now store a weak reference to Lua) - Removed (experimental) owned types (they no longer needed)
- Make Lua types truly
SendandSync(when enablingsendfeature flag) - Removed
UserDataimpl for Rc/Arc types ("any" userdata functions can be used instead) Lua::replace_registry_valuetakes&mut RegistryKeyLua::scopetemporary disabled (will be re-added in the next release)
- Dropped
-
0.9.918 Jun 2024Release notes
Open source →- Minimal Luau updated to 0.629
- Fixed bug when attempting to reset or resume already running coroutines (#416).
- Added
RegistryKey::id()method to get the underlying Lua registry key id.
-
0.9.815 May 2024Release notes
Open source →- Fixed serializing same table multiple times (#408)
- Use
mlua-sysv0.6 (to support Luau 0.624+) - Fixed cross compilation of windows dlls from unix (#394)
-
0.9.705 Apr 2024Release notes
Open source →- Implemented
IntoLuaforRegistryKey - Mark
__idivmetamethod as available for luau - Added
Function::deep_clone()method (Luau) - Added
SerializeOptions::detect_serde_json_arbitrary_precisionoption - Added
Lua::create_buffer()method (Luau) - Support serializing buffer type as a byte slice (Luau)
- Perf: Implemented
push_into_stack/from_stackforOption<T> - Added
Lua::create_ser_any_userdata()method
- Implemented
-
0.9.629 Feb 2024Release notes
Open source →- Added
to_pointerfunction toFunction/Table/Thread - Implemented
IntoLuafor&Value - Implemented
FromLuaforRegistryKey - Faster (~5%) table array traversal during serialization
- Some performance improvements for bool/int types
- Added
-
0.9.525 Jan 2024Release notes
Open source →- Minimal Luau updated to 0.609
- Luau max stack size increased to 1M (from 100K)
- Implemented
IntoLuafor refs toString/Table/Function/AnyUserData/Thread+RegistryKey - Implemented
IntoLuaandFromLuaforOwnedThread/OwnedString - Fixed
FromLuaderive proc macro to cover more cases
-
0.9.411 Jan 2024Release notes
Open source →- Fixed loading all-in-one modules under mixed states (eg. main state and coroutines)
-
0.9.309 Jan 2024Release notes
Open source →- WebAssembly support (
wasm32-unknown-emscriptentarget) - Performance improvements (faster Lua function calls for lua51/jit/luau)
- WebAssembly support (
-
0.9.222 Nov 2023Release notes
Open source →- Added binary modules support to Luau
- Added Luau package module (uses
StdLib::PACKAGE) with loaders (follows lua5.1 interface) - Added support of Luau 0.601+ buffer type (represented as userdata in Rust)
- LuaJIT
cdatatype is also represented as userdata in Rust (instead of panic) - Vendored LuaJIT switched to rolling vanilla (from openresty)
- Added
Table::for_eachmethod for fast table pairs traversal (faster thanpairs) - Performance improvements around table traversal (and faster serialization)
- Bug fixes and improvements
-
0.9.124 Aug 2023Release notes
Open source →- impl Default for Lua
- impl IntoLuaMulti for
std::result::Result<(), E> - Fix using wrong userdata index after processing Variadic args (#311)
-
0.9.017 Aug 2023Release notes
Open source →Changes since v0.9.0-rc.3
- Improved non-static (scoped) userdata support
- Added
Scope::create_any_userdata()method - Added
Lua::set_vector_metatable()method (unstablefeature flag) - Added
OwnedThreadtype (unstablefeature flag) - Minimal Luau updated to 0.590
- Added new option
sort_keystoDeserializeOptions(Lua::from_value()method) - Changed
Table::raw_len()output type tousize - Helper functions for
Value(eg:Value::as_number()/Value::as_string/etc) - Performance improvements
-
0.9.0-rc.328 Jul 2023 pre-release -
0.9.0-rc.228 Jul 2023 pre-releaseRelease notes
Open source →- Added
#[derive(FromLua)]macro to opt-in intoFromLua<T> where T: 'static + Clone(userdata type). - Support vendored module mode for windows (raw-dylib linking, Rust 1.71+)
moduleandvendoredfeatures are now mutually exclusive- Use
C-unwindABI (Rust 1.71+) - Changed
AsChunktrait to support capturing wrapped Lua types
- Added
-
0.9.0-rc.111 Jul 2023 pre-releaseRelease notes
Open source →UserDataMethods::add_async_method()takes&Tinstead of cloningT- Implemented
PartialEq<[T]>for tables - Added Luau 4-dimensional vectors support (
luau-vector4feature) Table::sequence_values()iterator no longer uses any metamethods (Table::raw_sequence_values()is deprecated)- Added
Table:is_empty()function that checks both hash and array parts - Refactored Debug interface
- Re-exported
ffi(mlua-sys) crate for easier writing of unsafe code - Refactored Lua 5.4 warnings interface
- Take
&stras function name inTableExtandAnyUserDataExttraits - Added module attribule
skip_memory_checkto improve performance - Added
AnyUserData::wrap()to provide more easy way of creating any userdata in Lua
-
0.9.0-beta.307 Jun 2023 pre-releaseRelease notes
Open source →- Added
OwnedAnyUserData::take() - Switch to
DeserializeOwned - Overwrite error context when called multiple times
- New feature flag
luau-jitto enable (experimental) Luau codegen backend - Set
__namefield in userdata metatable - Added
Value::to_string()method similar toluaL_tolstring - Lua 5.4.6
- Application data container now allows to mutably and immutably borrow different types at the same time
- Performance optimizations
- Support getting and setting environment for Lua functions.
- Added
UserDataFields::add_field()method to add static fields to UserData
Breaking changes:
- Require environment to be a
Tableinstead ofValuein Chunks. AsChunk::env()renamed toAsChunk::environment()
- Added
-
0.9.0-beta.227 Apr 2023 pre-releaseRelease notes
Open source →New features:
- Added
Thread::set_hook()function to set hook on threads - Added pretty print to the Debug formatting to Lua
ValueandTable - ffi layer moved to
mlua-syscrate - Added OwnedString (unstable)
Breaking changes:
- Refactor
HookTriggers(make it const)
- Added
-
0.9.0-beta.131 Mar 2023 pre-releaseRelease notes
Open source →New features:
- Owned Lua types (unstable feature flag)
- New functions
Function::wrap/Function::wrap_mut/Function::wrap_async Lua::register_userdata_type()to register a custom userdata types (without requiringUserDatatrait)Lua::create_any_userdata()- Added
create_userdata_ref/create_userdata_ref_mutfor scopes - Added
AnyUserDataExttrait with auxiliary functions forAnyUserData - Added
UserDataRefandUserDataRefMuttype wrapped that implementFromLua - Improved error handling:
- Improved error reporting when calling Rust functions from Lua.
- Added
Error::BadArgumentto help identify bad argument position or name - Added
ErrorContextextension trait to attach additional context toError
Breaking changes:
- Refactored
AsChunktrait ToLua/ToLuaMultirenamed toIntoLua/IntoLuaMulti- Renamed
to_lua_errtointo_lua_err - Removed
FromLuaimpl forT: UserData+Clone - Removed
Lua::async_scope - Added
&Luaarg to Luau interrupt callback
Other:
- Better Debug for String
- Allow deserializing values from serializable UserData using
Lua::from_value()method - Added
Table::clear()method - Added
Error::downcast_ref()method - Support setting memory limit for Lua 5.1/JIT/Luau
- Support setting module name in
#[lua_module(name = "...")]macro - Minor fixes and improvements
-
0.8.1017 Aug 2023Release notes
Open source →- Update to Luau 0.590 (luau0-src to 0.7.x)
- Fix loading luau code starting with \t
- Pin lua-src and luajit-src versions
-
0.8.916 May 2023Release notes
Open source →- Update minimal (vendored) Lua 5.4 to 5.4.6
- Use
lua_closethreadinstead oflua_resetthreadin vendored mode (Lua 5.4.6) - Allow deserializing Lua null into unit (
()) or unit struct.
-
0.8.805 Mar 2023Release notes
Open source →- Fix potential deadlock when trying to reuse dropped registry keys.
- Optimize userdata methods call when __index and fields_getters are nil
-
0.8.704 Jan 2023Release notes
Open source →- Minimum Luau updated to 0.555 (
LUAI_MAXCSTACKlimit increased to 100000) _VERSIONin Luau now includes version number- Fixed lifetime of
DebugNamesinDebug::names()andDebugSourceinDebug::source() - Fixed subtraction overflow when calculating index for
MultiValue::get()
- Minimum Luau updated to 0.555 (
-
0.8.611 Nov 2022 -
0.8.530 Oct 2022Release notes
Open source →- Fixed potential unsoundness when using
Layout::from_size_align_uncheckedand Rust 1.65+ - Performance optimizations around string and table creation in standalone mode
- Added fast track path to Table
get/set/lenmethods without metatable - Added new methods
push/pop/raw_push/raw_popto Table - Fix getting caller information from
Lua::load - Better checks and tests when trying to modify a Luau readonly table
- Fixed potential unsoundness when using
-
0.8.409 Oct 2022 -
0.8.302 Aug 2022Release notes
Open source →- Close to-be-closed variables for Lua 5.4 when using call_async functions (#192)
- Fixed Lua assertion when inspecting another thread stack. (#195)
- Use more reliable way to create LuaJIT VM (which can fail if use Rust allocator on non-x86 platforms)
-
0.8.225 Jul 2022Release notes
Open source →- Performance optimizations in handling UserData
- Minimal Luau updated to 0.536
- Fixed bug in
Function::bindwhen passing empty binds and no arguments (#189)
-
0.8.129 Jun 2022Release notes
Open source →- Added
Lua::create_proxyfor accessing to UserData static fields and functions without instance - Added
Table::to_pointer()andString::to_pointer()functions - Bugfixes and improvements (#176 #179)
- Added
-
0.8.009 Jun 2022Release notes
Open source →Changes since 0.7.4
- Luau support
- Removed C glue
- Added async support to
__indexand__newindexmetamethods - Added
Function::info()to get information about functions (#149). - Added
parking_lotdependency under feature flag (forUserData) Hashimplementation for Lua String- Added
Value::to_pointer()function - Performance improvements
Breaking changes:
- Refactored
AsChunktrait (added implementation forPathandPathBuf).
-
0.8.0-beta.525 May 2022 pre-releaseRelease notes
Open source →- Lua sources no longer needed to build modules
- Added
__itermetamethod for Luau - Added
Value::to_pointer()function - Added
Function::coveragefor Luau to obtain coverage report - Bugfixes and improvements (#153 #161 #168)
-
0.8.0-beta.425 Apr 2022 pre-releaseRelease notes
Open source →- Removed
&LuafromLua::set_interruptas it's not safe (introduced in v0.8.0-beta.3) - Enabled
Lua::gc_incfor Luau - Luau
debugmodule marked as safe (enabled by default) - Implemented
Hashfor Lua String - Support mode options in
collectgarbagefor Luau - Added ability to set global Luau compiler (used for loading all chunks).
- Refactored
AsChunktrait (breaking changes).AsChunknow implemented forPathandPathBufto load lua files from fs. - Added
parking_lotdependency and feature flag (forUserData) - Added
Function::info()to get information about functions (#149). - Bugfixes and improvements (#104 #142)
- Removed
-
0.8.0-beta.303 Apr 2022 pre-releaseRelease notes
Open source →- Luau vector constructor
- Luau sandboxing support
- Luau interrupts (yieldable)
- More Luau compiler options (mutable globals)
- Other performance improvements
-
0.8.0-beta.225 Mar 2022 pre-releaseRelease notes
Open source →- Luau vector datatype support
- Luau readonly table attribute
- Other Luau improvements
-
0.8.0-beta.122 Mar 2022 pre-releaseRelease notes
Open source →- Luau support
- Refactored ffi module. C glue is no longer required
- Added async support to
__indexand__newindexmetamethods
-
0.7.401 Mar 2022Release notes
Open source →- Improved
Lua::create_registry_valueto reuse previously expired registry keys. No need to callLua::expire_registry_valueswhen creating/dropping registry values. - Added
Lua::replace_registry_valueto change value of an existing Registry Key - Async calls optimization
- Improved
-
0.7.319 Jan 2022 -
0.7.217 Jan 2022Release notes
Open source →- Allow
pkg-configto omit include paths if they equals to standard (#114). - Various bugfixes (eg. #121)
- Allow
-
0.7.124 Dec 2021Release notes
Open source →- Fixed traceback generation for errors (#112)
Lua::into_static/from_staticmethods have been removed from the docs and are discouraged for use
-
0.7.025 Nov 2021Release notes
Open source →- New "application data" api to store arbitrary objects inside Lua
- New feature flag
luajit52to build/support LuaJIT with partial compatibility with Lua 5.2 - Added async meta methods for all Lua (except 5.1)
- Added
AnyUserData::take()to take UserData objects from Lua - Added
set_nth_user_value/get_nth_user_valuetoAnyUserDatafor all Lua versions - Added
set_named_user_value/get_named_user_valuetoAnyUserDatafor all Lua versions - Added
Lua::inspect_stack()to get information about the interpreter runtime stack - Added
set_warning_function/remove_warning_function/warningfunctions toLuafor 5.4 - Added
TableExt::call()to call tables with__callmetamethod as functions - Added
Lua::unload()to unload modules ToLuaimplementation for arrays changed to const generics- Added thread (coroutine) cache for async execution (disabled by default and works for Lua 5.4/JIT)
- LuaOptions and (De)SerializeOptions marked as const
- Fixed recursive tables serialization when using
serde::Serializefor Lua Tables - Improved errors reporting. Now source included to
fmt::Displayimplementation forError::CallbackError - Major performance improvements
-
0.6.612 Oct 2021Release notes
Open source →- Fixed calculating
LUA_REGISTRYINDEXwhen cross-compiling for lua51/jit (#82) - Updated documentation & examples
- Fixed calculating