NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #4481 most downloaded on crates.io
Low level (FFI) bindings to Lua 5.5/5.4/5.3/5.2/5.1 (including LuaJIT) and Luau
Last release 5 days ago
03 Oct 2026
Ships fairly regularly
a new release about every 5 weeks
Most releases are documented
notes for 20 of 31 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
32 releases · first in 2022
One column per quarter.
Nothing published for this version
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
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
Nothing published for this version
Added 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 ErrorImproved 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)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).New "application data" api to store arbitrary objects inside Lua
luajit52 to build/support LuaJIT with partial compatibility with Lua 5.2AnyUserData::take() to take UserData objects from Luaset_nth_user_value/get_nth_user_value to AnyUserData for all Lua versionsset_named_user_value/get_named_user_value to AnyUserData for all Lua versionsLua::inspect_stack() to get information about the interpreter runtime stackset_warning_function/remove_warning_function/warning functions to Lua for 5.4TableExt::call() to call tables with __call metamethod as functionsLua::unload() to unload modulesToLua implementation for arrays changed to const genericsserde::Serialize for Lua Tablesfmt::Display implementation for Error::CallbackErrorNothing published for this version
Nothing published for this version
Fixed calculating LUA_REGISTRYINDEX when cross-compiling for lua51/jit
LUA_REGISTRYINDEX when cross-compiling for lua51/jit (#82)Fixed bug when polling async futures
Location::caller() information to Lua::load() if chunk's name is None (Rust 1.46+)Fixed table traversal used in recursion detection in deserializer
Disabled catching Rust panics in userdata finalizers on drop. It also has positive performance impact.
Debug::event() to the hook's Debug structurehook::HookTriggersExtraData in module mode. This helps avoiding memory leak on closing state when Lua unloads modules and frees memory.DeserializeOptions struct to control deserializer behavior (from_value_with function).New functionality: Lua::load_from_function() and Lua::create_c_function()
Lua::load_from_function() and Lua::create_c_function()Update chunk! documentation (stable Rust limitations)
chunk! documentation (stable Rust limitations)once_cell dependency lowered to 1.0Full access to UserData metatables with support of setting arbitrary fields.
Changes since 0.5.4
UserDataFields APIUserData metatables with support of setting arbitrary fields.UserData for Rc<RefCell<T>>/Arc<Mutex<T>>/Arc<RwLock<T>> where T: UserData.SerializeOptions to to change default Lua serializer behaviour (eg. nil/null/array serialization)LuaOptions to customize Lua/Rust behaviour (currently panic handling)ToLua/FromLua implementation for Box<str> and Box<[T]>.Thread::reset() for luajit/lua54 to recycle threads (coroutines) with attaching a new function.chunk! macro support to load chunks of Lua code using the Rust tokenizer and optionally capturing Rust variables.Error's __tostring method formats full stacktraces). This is useful in a module mode.String::to_string_lossyBreaking changes:
Send + Sync to be compatible with the anyhow crate.Result from LuaSerdeExt::null() and LuaSerdeExt::array_metatable() (never fails)Result from Function::dump() (never fails)AnyUserData::has_metamethod() (in favour of full access to metatables)Some performance optimisations (callbacks)
ToLua implementation for Cow<str> and Cow<CStr>Scope destruction of partially polled futuresSupport cross compilation that should work well for vendored builds (including LuaJIT with some restrictions)
Serde support under serialize feature flag.
serialize feature flag.mlua_derive.ToLua and FromLua for HashSet and BTreeSetRemoved deprecated Table::call() function.
MetaMethod::Close.lua53 feature is disabled by default. Now preferred Lua version have to be chosen explicitly.require or package.loadlib) are disabled. Equivalent to the previous Lua::new() function is Lua::unsafe_new().send feature to require Send.module feature, that disables linking to Lua Core Libraries. Required for modules.'callback outlive 'lua in Lua::create_function() to fix the unsoundness.Lua::into_static() to make 'static Lua state. This is useful to spawn async Lua threads that requires 'static.Lua::set_memory_limit() (similar to rlua) to enable memory restrictions in Lua VM (requires Lua >= 5.2).Scope, temporary removed in v0.3, is back with async support.Table::call() function.AnyUserData::has_metamethod() function.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →