NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io, #3885 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.
Latest stable
0.12.2
Last release 1 months ago
03 Oct 2026
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 55 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
7 years old
87 releases · first in 2019
Drag across the ruler to compare, or tap a release to open it.
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::CallbackErrorFixed calculating LUA_REGISTRYINDEX when cross-compiling for lua51/jit
Your coding agent can read these notes before it upgrades. Set up the MCP server →
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)Errors are always Send + Sync to be compatible with anyhow crate
Send + Sync to be compatible with anyhow crateUserData for Rc<RefCell>/Arc<Mutex>/Arc<RwLock>__ipairs metamethod for Lua 5.2String::to_string_lossy[Breaking] Removed AnyUserData::has_metamethod()
AnyUserData::has_metamethod()Thread::reset() for luajit/lua54 to recycle threads.
It's possible to attach a new function to a thread (coroutine).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 the module mode.Allow to define arbitrary MetaMethods
UserDataFields APIMetaMethods::name() is publicSerializeOptions to to change default Lua serializer behaviour (eg. nil/null/array serialization)Result from LuaSerdeExt::null() and LuaSerdeExt::array_metatable() (never fails)Result from Function::dump() (never fails)ToLua/FromLua implementation for Box<str> and Box<[T]>LuaOptions to customize Lua/Rust behaviour (currently panic handling)Improvements in panic handling (resume panic on value popping)
Fixed bug when returning nil-prefixed multi values from async function (+ test)
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 BTreeSetAdded Function::dump() to dump lua function to a binary chunk
Function::dump() to dump lua function to a binary chunkChunkMode enum to mark chunks as text or binaryset_memory_limit docNothing published for this version
Removed 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
One column per quarter.