mlua-sys
Low level (FFI) bindings to Lua 5.5/5.4/5.3/5.2/5.1 (including LuaJIT) and Luau
0.11.0
4.7M downloads/mo
#4651 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 2 months
Most releases are documented
notes for 19 of 29 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
30 releases · first in 2022
4 releases in the last 12 months
see the full history below
Release timeline
30 releases · Jul 2022 to Jul 2026Releases
latest 30-
0.11.005 Jul 2026Release 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-rc.121 Apr 2026 pre-releaseNothing published for this version
-
0.10.027 Jan 2026Release 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.9.023 Nov 2025Release 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.8.310 Aug 2025Release 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.214 Jul 2025Release 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.123 Jun 2025Release 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.012 Jun 2025Release 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.7.005 May 2025Release 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.824 May 2025Nothing published for this version
-
0.6.727 Jan 2025Nothing published for this version
-
0.6.601 Dec 2024Release notes
Open source →- Fixed calculating
LUA_REGISTRYINDEXwhen cross-compiling for lua51/jit (#82) - Updated documentation & examples
- Fixed calculating
-
0.6.509 Nov 2024Release notes
Open source →- Fixed bug when polling async futures (#77)
- Refactor Waker handling in async code (+10% performance gain when calling async functions)
- Added
Location::caller()information toLua::load()if chunk's name is None (Rust 1.46+) - Added serialization of i128/u128 types (serde)
-
0.6.425 Oct 2024Release notes
Open source →- Performance optimizations
- Fixed table traversal used in recursion detection in deserializer
-
0.6.307 Sep 2024Release notes
Open source →- Disabled catching Rust panics in userdata finalizers on drop. It also has positive performance impact.
- Added
Debug::event()to the hook's Debug structure - Simplified interface of
hook::HookTriggers - Added finalizer to
ExtraDatain module mode. This helps avoiding memory leak on closing state when Lua unloads modules and frees memory. - Added
DeserializeOptionsstruct to control deserializer behavior (from_value_withfunction).
-
0.6.226 Jul 2024Release notes
Open source →- New functionality:
Lua::load_from_function()andLua::create_c_function() - Many optimizations in callbacks/userdata creation and methods execution
- New functionality:
-
0.6.118 Jun 2024Release notes
Open source →- Update
chunk!documentation (stable Rust limitations) - Fixed Lua sequence table conversion to HashSet/BTreeSet
once_celldependency lowered to 1.0
- Update
-
0.6.015 May 2024Release notes
Open source →Changes since 0.5.4
- New
UserDataFieldsAPI - Full access to
UserDatametatables with support of setting arbitrary fields. - Implement
UserDataforRc<RefCell<T>>/Arc<Mutex<T>>/Arc<RwLock<T>>whereT: UserData. - Added
SerializeOptionsto to change default Lua serializer behaviour (eg.nil/null/arrayserialization) - Added
LuaOptionsto customize Lua/Rust behaviour (currently panic handling) - Added
ToLua/FromLuaimplementation forBox<str>andBox<[T]>. - Added
Thread::reset()for luajit/lua54 to recycle threads (coroutines) with attaching a new function. - Added
chunk!macro support to load chunks of Lua code using the Rust tokenizer and optionally capturing Rust variables. - Improved errors reporting (
Error's__tostringmethod formats full stacktraces). This is useful in a module mode. - Added
String::to_string_lossy - Various bugfixes and improvements
Breaking changes:
- Errors are always
Send + Syncto be compatible with the anyhow crate. - Removed
ResultfromLuaSerdeExt::null()andLuaSerdeExt::array_metatable()(never fails) - Removed
ResultfromFunction::dump()(never fails) - Removed
AnyUserData::has_metamethod()(in favour of full access to metatables)
- New
-
0.5.205 Apr 2024Release notes
Open source →- Some performance optimisations (callbacks)
ToLuaimplementation forCow<str>andCow<CStr>- Fixed bug with
Scopedestruction of partially polled futures
-
0.5.125 Jan 2024Release notes
Open source →- Support cross compilation that should work well for vendored builds (including LuaJIT with some restrictions)
- Fix numeric types conversion for 32bit Lua
- Update tokio to 1.0 for async examples
-
0.5.009 Jan 2024Release notes
Open source →- Serde support under
serializefeature flag. - Re-export
mlua_derive. - impl
ToLuaandFromLuaforHashSetandBTreeSet
- Serde support under
-
0.4.022 Nov 2023Release notes
Open source →- Lua 5.4 support with
MetaMethod::Close. lua53feature is disabled by default. Now preferred Lua version have to be chosen explicitly.- Provide safety guarantees for Lua state, which means that potentially unsafe operations, like loading C modules (using
requireorpackage.loadlib) are disabled. Equivalent to the previousLua::new()function isLua::unsafe_new(). - New
sendfeature to requireSend. - New
modulefeature, that disables linking to Lua Core Libraries. Required for modules. - Don't allow
'callbackoutlive'luainLua::create_function()to fix the unsoundness. - Added
Lua::into_static()to make'staticLua state. This is useful to spawn async Lua threads that requires'static. - New function
Lua::set_memory_limit()(similar torlua) to enable memory restrictions in Lua VM (requires Lua >= 5.2). Scope, temporary removed in v0.3, is back with async support.- Removed deprecated
Table::call()function. - Added hooks support (backported from rlua 0.17).
- New
AnyUserData::has_metamethod()function. - LuaJIT 2.0.5 (the latest stable) support.
- Various bug fixes and improvements.
- Lua 5.4 support with
-
0.3.217 Aug 2023Nothing published for this version
-
0.3.128 Jul 2023Nothing published for this version
-
0.3.028 Jul 2023Nothing published for this version
-
0.2.111 Jul 2023Nothing published for this version
-
0.2.007 Jun 2023Nothing published for this version
-
0.1.127 Apr 2023Nothing published for this version
-
0.1.013 Apr 2023Nothing published for this version
-
0.0.024 Jul 2022Nothing published for this version