NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #4095 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 19 days ago
29 Aug 2026
Ships fairly regularly
a new release about every 4 weeks
Most releases are documented
notes for 53 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
7 years old
86 releases · first in 2019
One column per quarter.
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)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
Your coding agent can read these notes before it upgrades. Set up the MCP server →