NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #3976 most downloaded on crates.io
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.
Last release 4 days ago
03 Oct 2026
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 54 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
7 years old
87 releases · first in 2019
Added recursion_limit to SerializeOptions and DeserializeOptions (defaults to 128)
Value::weak_lua helper (#714)recursion_limit to SerializeOptions and DeserializeOptions (defaults to 128)ValuesTable::equals now follows the backend's native __eq semanticsrequire from chunks loaded by path (#735) and require context lifetimesFull Changelog: v0.12.1...v0.12.2
One column per quarter.
Allow #[mlua::userdata_impl] to be used in a different module from #[derive(UserData)]
#[mlua::userdata_impl] to be used in a different module from #[derive(UserData)] (#726)Full Changelog: v0.12.0...v0.12.1
More ergonomic UserData building blocks
UserData with #[derive(UserData)] and register methods/fields with the new #[mlua::userdata_impl] attribute macro.UserDataOwned<T> wrapper takes ownership of userdata and implements FromLuaUserDataMethods::add_method_once/add_async_method_once__todebugstring metamethod for pretty-printing userdata when debuggingMaybeSync trait for userdata under the send featureTypes are now grouped into focused modules: chunk, debug, error, function, table, string, state, thread, userdata and luau.
Hook into coroutine create/resume/yield events across all Lua versions (when using mlua API).
Latest Luau with extended require-by-string support and JIT options.
Lua::gc_inc / Lua::gc_gen are replaced by a Lua::gc_set_mode, with GcIncParams/GcGenParams for fine-grained tuning.
ThreadStatus::Normal and Thread::is_normal (mimic coroutine.status)Lua::set_jit_options with support of Luau JIT inliner (Luau)Value::as_vector/Value::is_vector (Luau)Table::removeserde: tables with the array metatable are always encoded as arrays (incl. detect_mixed_tables option)Hash for BorrowedStr/BorrowedBytesLua::current_thread resolves implicit async threads to their root owner (#706)Full Changelog: v0.11.6...v0.12.0
The new stable version is almost ready and will be released after some testing
The new stable version is almost ready and will be released after some testing
#[derive(UserData)] and #[userdata_impl] macrosto_alias_override/to_alias_fallback in Require trait (Luau)String::to_pointer return NULL in Lua <5.4Full Changelog: v0.12.0-rc.1...v0.12.0-rc.2
Removed Error::ToLuaConversionError variant as it was unused (and not practically useful)
Error::ToLuaConversionError variant as it was unused (and not practically useful)chunk, debug, error, function, table, string, state, thread, userdata, luau__todebugstring metamethod for pretty formatting userdata value (for debugging)MaybeSync trait that is required for userdata typesBorrowedStr and BorrowedBytesThread methods: is_resumable, is_running, is_finished, is_errorThread::state to get raw Lua state pointerTextRequirer is renamed to FsRequirerLua::gc_inc/Lua::gc_gen is replaced with gc_set_modeGcIncParams and GcGenParams for GC tuningUserDataMethods::add_method_once and UserDataMethods::add_async_method_onceFunction::wrap/wrap_mut/wrap_async to support any Error typeAnyUserData::type_name to return LuaString insteadUserDataOwned<T> wrapper to take ownership of userdata T and implements FromLuaFull Changelog: v0.11.6...v0.12.0-rc.1
Lua 5.5 support under the new lua55 feature flag
lua55 feature flagAnyUserData::is_proxynum_params, num_upvalues, is_vararg to FunctionInfoFull Changelog: v0.11.5...v0.11.6
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.
lua55 feature flag)AnyUserData::is_proxy method to check if userdata is a proxynum_params, num_upvalues, is_vararg to FunctionInfoAdded Lua::set_memory_category and Lua::heap_dump functions to profile (Luau) memory
Lua::set_memory_category and Lua::heap_dump functions to profile (Luau) memoryLua::type_metatable helper to get metatable of a primitive typeLua::traceback function to generate stack traces at different levelsadd_method_once /add_async_method_once UserData methods (experimental)AnyUserData::type_name publicIntoLuaMulti for &MultiValueFull Changelog: v0.11.4...v0.11.5
Make Value::to_serializable public
Value::to_serializable publicserde option detect_mixed_tables (to encode mixed array+map tables)ObjectLike::get_path helper (for tables and userdata) for easy access of nested data__namecall optimization for LuauFull Changelog: v0.11.3...v0.11.4
Value::to_serializable publicdetect_mixed_tables (to encode mixed array+map tables)ObjectLike::get_path helper (for tables and userdata)Added Lua::yield_with to use as coroutine.yield functional replacement in async functions for any Lua (see doc examples)
Lua::yield_with to use as coroutine.yield functional replacement in async functions for any Lua (see doc examples)Buffer::cursor method (Luau)Lua::create_buffer_with_capacity method (Luau)Full Changelog: v0.11.2...v0.11.3
Lua::yield_with to use as coroutine.yield functional replacement in async functions for any LuaBuffer::cursor method (Luau)Lua::create_buffer_with_capacity method (Luau)Faster stack push for Variadic<T>
Variadic<T>-0.0 (#618)Full Changelog: v0.11.1...v0.11.2
Variadic<T>-0.0 (#618)Fixed bug exhausting Lua auxiliary stack and leaving it without reserve
Full Changelog: v0.11.0...v0.11.1
Debug::curr_line is deprecated in favour of Debug::current_line that returns Option<usize>
external mlua-sys feature flagLua::inspect_stack takes a callback with &Debug argument, instead of returning Debug directlyDebug::function method to get function running at a given levelDebug::curr_line is deprecated in favour of Debug::current_line that returns Option<usize>Lua::set_globals method to replace global environmentTable::set_metatable now returns Result<()> (this operation can fail in sandboxed Luau mode)impl ToString replaced with Into<StdString> in UserData registrationValue::as_str and Value::as_string_lossy methods are deprecated (as they are non-idiomatic)Full Changelog: v0.11.0-beta.3...v0.11.0
Luau in sandboxed mode has reduced options in collectgarbage function (to follow the official doc)
collectgarbage function (to follow the official doc)Function::deep_clone now returns Result<Function> as this operation can trigger memory errorsAsyncThread on drop (call_async methods family)Terminate Rust Future when AsyncThread is dropped (without relying on Lua GC)
Future when AsyncThread is dropped (without relying on Lua GC)loadstring function to LuauAsChunk trait dyn-friendlyRequire trait synced with Luau 0.674Require trait methods now can return Error variant (in NavigateError enum)__type to Error's userdata metatable (for typeof function)parking_log/send_guard is moved to userdata-wrappers feature flagserde feature flag to replace serialize (the old one is still available)52 bit integers support for Luau (this is a breaking change)
Require trait and async support)Thread::resume_error support for LuauAsyncThread<A, R> changed to AsyncThread<R> (A pushed to stack immediately)'a moved from AsChunk<'a> to AsChunk::source where Self: 'aLua::scope pass &Scope instead of &mut Scope to closureLua::init_from_ptr renamed to Lua::get_or_init_from_ptr and returns &LuaLua:load_from_function is deprecated (this is register_module now)Lua::register_module and Lua::preload_moduleNothing published for this version
New serde option encode_empty_tables_as_array to serialize empty tables as arrays
encode_empty_tables_as_array to serialize empty tables as arraysWeakLua and Lua::weak() to create weak references to Lua stateAnyUserData::type_id() method to get the type id of the userdataChunk::name(), Chunk::environment() and Chunk::mode() functionsUserDataRef and UserDataRefMut (under userdata-wrappers feature)serde for bstr if serialize feature flag is enabledIntoLua/FromLua for BorrowedString and BorrowedBytesIntoLua/FromLua for charThread::reset() for all Lua versions (limited support for 5.1-5.3)Set Default for Value to be Nil
Default for Value to be NilValue (#502)Table::set_safeenv method (Luau)Switch proc-macro-error to proc-macro-error2
String::wrap method to wrap arbitrary AsRef<[u8]> into impl IntoLuaUserData (less generics)Added Luau native vector library support (this can change behavior if you use vector function!)
vector function!)String::display methodScope::create_any_userdata to create Lua objects from any non-'static Rust typesAnyUserData::destroy methoduserdata-wrappers feature to impl UserData for Rc<T>/Arc<T>/Rc<RefCell<T>>/Arc<Mutex<T>> (similar to v0.9)UserDataRef in send mode now uses shared lock if T: Sync (and exclusive lock otherwise)Scope::add_destructor to attach custom destructorsLua::try_app_data_ref and Lua::try_app_data_mut methodsFrom<Vec> and Into<Vec> support to MultiValue and Variadic typesAdded error-send feature flag (disabled by default) to require Send + Sync for Error
Changes since v0.10.0-rc.1
error-send feature flag (disabled by default) to require Send + Sync for ErrorSupport yielding from hooks for Lua 5.3+
Lua::scope is backLuaNativeFn/LuaNativeFnMut/LuaNativeAsyncFn traits for using in Function::wrapError::chain method to return iterator over nested errorsLua::exec_raw helper to execute low-level Lua C API codeEither<L, R> enum to combine two types into a single oneBuffer type for LuauValue::is_error and Value::as_error helpersValue::Other variant to represent unknown Lua types (eg LuaJIT CDATA)anyhow feature to implement IntoLua for anyhow::ErrorIntoLua/FromLua for OsString/OsStr and PathBuf/PathUpdated ThreadStatus enum to include Running and Finished variants.
ThreadStatus enum to include Running and Finished variants.Error::CoroutineInactive renamed to Error::CoroutineUnresumable.IntoLua/IntoLuaMulti now uses impl trait syntax for args (shorten from a.get::<_, T> to a.get::<T>).Lua::into_static/from_static methods.Send bound if send feature is enabled.UserDataMethods and UserDataFields traits.Compiler::compile() now returns Result (Luau).Clone requirement from UserDataFields::add_field().TableExt and AnyUserDataExt traits were combined into ObjectLike trait.send feature in module mode (since we don't have exclusive access to Lua).Chunk::set_environment() takes Table instead of IntoLua type.next_key_seed and next_value_seed.serde_userdata.Dropped 'lua lifetime (subtypes now store a weak reference to Lua)
'lua lifetime (subtypes now store a weak reference to Lua)Send and Sync (when enabling send feature flag)UserData impl for Rc/Arc types ("any" userdata functions can be used instead)Lua::replace_registry_value takes &mut RegistryKeyLua::scope temporary disabled (will be re-added in the next release)Fixed bug when attempting to reset or resume already running coroutines (#416).
RegistryKey::id() method to get the underlying Lua registry key id.Fixed serializing same table multiple times
mlua-sys v0.6 (to support Luau 0.624+)Implemented IntoLua for RegistryKey
IntoLua for RegistryKey__idiv metamethod as available for luauFunction::deep_clone() method (Luau)SerializeOptions::detect_serde_json_arbitrary_precision optionLua::create_buffer() method (Luau)push_into_stack/from_stack for Option<T>Lua::create_ser_any_userdata() methodAdded to_pointer function to Function/Table/Thread
to_pointer function to Function/Table/ThreadIntoLua for &ValueFromLua for RegistryKeyLuau max stack size increased to 1M (from 100K)
IntoLua for refs to String/Table/Function/AnyUserData/Thread + RegistryKeyIntoLua and FromLua for OwnedThread/OwnedStringFromLua derive proc macro to cover more casesFixed loading all-in-one modules under mixed states (eg. main state and coroutines)
WebAssembly support (wasm32-unknown-emscripten target)
wasm32-unknown-emscripten target)Added binary modules support to Luau
StdLib::PACKAGE) with loaders (follows lua5.1 interface)cdata type is also represented as userdata in Rust (instead of panic)Table::for_each method for fast table pairs traversal (faster than pairs)impl IntoLuaMulti for std::Result<(), E>
std::result::Result<(), E>Improved non-static (scoped) userdata support
Changes since v0.9.0-rc.3
Scope::create_any_userdata() methodLua::set_vector_metatable() method (unstable feature flag)OwnedThread type (unstable feature flag)sort_keys to DeserializeOptions (Lua::from_value() method)Table::raw_len() output type to usizeValue (eg: Value::as_number()/Value::as_string/etc)- Minimal Luau updated to 0.588
Added #[derive(FromLua)] macro to opt-in into FromLua where T: 'static + Clone (userdata type).
#[derive(FromLua)] macro to opt-in into FromLua<T> where T: 'static + Clone (userdata type).module and vendored features are now mutually exclusiveC-unwind ABI (Rust 1.71+)AsChunk trait to support capturing wrapped Lua typesTable::sequence_values() iterator no longer uses any metamethods (Table::raw_sequence_values() is deprecated)
UserDataMethods::add_async_method() takes &T instead of cloning TPartialEq<[T]> for tablesluau-vector4 feature)Table::sequence_values() iterator no longer uses any metamethods (Table::raw_sequence_values() is deprecated)Table:is_empty() function that checks both hash and array partsffi (mlua-sys) crate for easier writing of unsafe code&str as function name in TableExt and AnyUserDataExt traitsskip_memory_check to improve performanceAnyUserData::wrap() to provide more easy way of creating any userdata in LuaOverwrite error context when called multiple times
OwnedAnyUserData::take()DeserializeOwnedluau-jit to enable (experimental) Luau codegen backend__name field in userdata metatableValue::to_string() method similar to luaL_tolstringUserDataFields::add_field() method to add static fields to UserDataBreaking changes:
Table instead of Value in Chunks.AsChunk::env() renamed to AsChunk::environment()Added Thread::set_hook() function to set hook on threads
New features:
Thread::set_hook() function to set hook on threadsValue and Tablemlua-sys crateBreaking changes:
HookTriggers (make it const)Owned Lua types (unstable feature flag)
New features:
Function::wrap/Function::wrap_mut/Function::wrap_asyncLua::register_userdata_type() to register a custom userdata types (without requiring UserData trait)Lua::create_any_userdata()create_userdata_ref/create_userdata_ref_mut for scopesAnyUserDataExt trait with auxiliary functions for AnyUserDataUserDataRef and UserDataRefMut type wrapped that implement FromLuaError::BadArgument to help identify bad argument position or nameErrorContext extension trait to attach additional context to ErrorBreaking changes:
AsChunk traitToLua/ToLuaMulti renamed to IntoLua/IntoLuaMultito_lua_err to into_lua_errFromLua impl for T: UserData+CloneLua::async_scope&Lua arg to Luau interrupt callbackOther:
Lua::from_value() methodTable::clear() methodError::downcast_ref() method#[lua_module(name = "...")] macroUpdate to Luau 0.590 (luau0-src to 0.7.x)
Update minimal (vendored) Lua 5.4 to 5.4.6
lua_closethread instead of lua_resetthread in vendored mode (Lua 5.4.6)()) or unit struct.Fix potential deadlock when trying to reuse dropped registry keys.
Minimum Luau updated to 0.555 (LUAI_MAXCSTACK limit increased to 100000)
LUAI_MAXCSTACK limit increased to 100000)_VERSION in Luau now includes version numberDebugNames in Debug::names() and DebugSource in Debug::source()MultiValue::get()Fixed bug when recycled Registry slot can be set to Nil
Fixed potential unsoundness when using Layout::from_size_align_unchecked and Rust 1.65+
Layout::from_size_align_unchecked and Rust 1.65+get/set/len methods without metatablepush/pop/raw_push/raw_pop to TableLua::load- Minimal Luau updated to 0.548
Close to-be-closed variables for Lua 5.4 when using call_async functions
Performance optimizations in handling UserData
Function::bind when passing empty binds and no arguments (#189)Added Lua::create_proxy for accessing to UserData static fields and functions without instance
Lua::create_proxy for accessing to UserData static fields and functions without instanceTable::to_pointer() and String::to_pointer() functionsAdded async support to __index and __newindex metamethods
Changes since 0.7.4
__index and __newindex metamethodsFunction::info() to get information about functions (#149).parking_lot dependency under feature flag (for UserData)Hash implementation for Lua StringValue::to_pointer() functionBreaking changes:
AsChunk trait (added implementation for Path and PathBuf).Lua sources no longer needed to build modules
__iter metamethod for LuauValue::to_pointer() functionFunction::coverage for Luau to obtain coverage reportRefactored AsChunk trait (breaking changes). AsChunk now implemented for Path and PathBuf to load lua files from fs.
&Lua from Lua::set_interrupt as it's not safe (introduced in v0.8.0-beta.3)Lua::gc_inc for Luaudebug module marked as safe (enabled by default)Hash for Lua Stringcollectgarbage for LuauAsChunk trait (breaking changes).
AsChunk now implemented for Path and PathBuf to load lua files from fs.parking_lot dependency and feature flag (for UserData)Function::info() to get information about functions (#149).More Luau compiler options (mutable globals)
- Luau vector datatype support - Luau readonly table attribute - Other Luau improvements
Refactored ffi module. C glue is no longer required
__index and __newindex metamethodsImproved Lua::create_registry_value to reuse previously expired registry keys. No need to call Lua::expire_registry_values when creating/dropping regi
Lua::create_registry_value to reuse previously expired registry keys.
No need to call Lua::expire_registry_values when creating/dropping registry values.Lua::replace_registry_value to change value of an existing Registry KeyFixed cross-compilation issue (introduced in 84a174c)
Allow pkg-config to omit include paths if they equals to standard (#114).
pkg-config to omit include paths if they equals to standard (#114).Fixed traceback generation for errors
Lua::into_static/from_static methods have been removed from the docs and are discouraged for useYour coding agent can read these notes before it upgrades. Set up the MCP server →