PackageTrack
Sign in Get early access

mlua

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.

0.12.0 6.2M downloads/mo #4066 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 4 weeks

Most releases are documented

notes for 52 of 61 stable releases

1 version withdrawn

withdrawn after publishing

7 years old

85 releases · first in 2019

7 releases in the last 12 months

see the full history below

Release timeline

85 releases · Nov 2019 to Jul 2026
2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 60 of 85
  1. 0.12.0 05 Jul 2026
    Release notes

    Highlights

    More ergonomic UserData building blocks

    • Declaratively implement 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 FromLua
    • UserDataMethods::add_method_once/add_async_method_once
    • __todebugstring metamethod for pretty-printing userdata when debugging
    • MaybeSync trait for userdata under the send feature

    Reorganized public API

    Types are now grouped into focused modules: chunk, debug, error, function, table, string, state, thread, userdata and luau.

    Thread lifecycle callbacks

    Hook into coroutine create/resume/yield events across all Lua versions (when using mlua API).

    Luau improvements

    Latest Luau with extended require-by-string support and JIT options.

    Garbage-collector interface refactor

    Lua::gc_inc / Lua::gc_gen are replaced by a Lua::gc_set_mode, with GcIncParams/GcGenParams for fine-grained tuning.

    What's Changed (since v0.12.0-rc.2)

    • Crate root re-exports are refactored (only essentials are re-exported, the rest is in the new submodules)
    • Added ThreadStatus::Normal and Thread::is_normal (mimic coroutine.status)
    • Added Lua::set_jit_options with support of Luau JIT inliner (Luau)
    • Added Value::as_vector/Value::is_vector (Luau)
    • Added Table::remove
    • serde: tables with the array metatable are always encoded as arrays (incl. detect_mixed_tables option)
    • impl Hash for BorrowedStr/BorrowedBytes
    • Lua::current_thread resolves implicit async threads to their root owner (#706)
    • Bugfixes and improvements

    Full Changelog: v0.11.6...v0.12.0

    Open source →
    Release notes

    Changes since v0.12.0-rc.2

    • Create root re-exports are refactored (only essentials are re-exported, the rest is in the new submodules)
    • Added ThreadStatus::Normal and Thread::is_normal (mimic coroutine.status)
    • Added Lua::set_jit_options with support of Luau JIT inliner (Luau)
    • Added Value::as_vector/Value::is_vector (Luau)
    • Added Table::remove
    • serde: tables with the array metatable are always encoded as arrays (incl. detect_mixed_tables option)
    • impl Hash for BorrowedStr/BorrowedBytes
    • Lua::current_thread resolves implicit async threads to their root owner (#706)
    • Bugfixes and improvements
    Open source →
  2. 0.12.0-rc.2 06 Jun 2026 pre-release
    Release notes

    The new stable version is almost ready and will be released after some testing

    What's Changed

    • Add #[derive(UserData)] and #[userdata_impl] macros
    • Support thread create/resume/yield callbacks for all Lua versions (including Luau)
    • Support to_alias_override/to_alias_fallback in Require trait (Luau)
    • Prevent XRc overflow when dropping RawLua with foreign Lua state
    • Implement Not for StdLib (#699)
    • Fix String::to_pointer return NULL in Lua <5.4

    Full Changelog: v0.12.0-rc.1...v0.12.0-rc.2

    Open source →
    Release notes
    • Add #[derive(UserData)] and #[mlua::userdata_impl] macros
    • Support thread create/resume/yield callbacks for all Lua versions (including Luau)
    • Support to_alias_override/to_alias_fallback in Require trait (Luau)
    • Prevent XRc overflow when dropping RawLua with foreign Lua state
    • implement Not for StdLib (#699)
    • Fix String::to_pointer return NULL in Lua <5.4
    Open source →
  3. 0.12.0-rc.1 21 Apr 2026 pre-release
    Release notes

    What's Changed

    • Switch to Rust 2024 edition
    • Removed Error::ToLuaConversionError variant as it was unused (and not practically useful)
    • New modules to group data types: chunk, debug, error, function, table, string, state, thread, userdata, luau
    • Support __todebugstring metamethod for pretty formatting userdata value (for debugging)
    • New MaybeSync trait that is required for userdata types
    • Removed lifetime from BorrowedStr and BorrowedBytes
    • New Thread methods: is_resumable, is_running, is_finished, is_error
    • Added Thread::state to get raw Lua state pointer
    • Luau TextRequirer is renamed to FsRequirer
    • GC interface refactor: Lua::gc_inc/Lua::gc_gen is replaced with gc_set_mode
    • Added GcIncParams and GcGenParams for GC tuning
    • New UserDataMethods::add_method_once and UserDataMethods::add_async_method_once
    • Initial Luau integer64 type support
    • Changed interface of Function::wrap/wrap_mut/wrap_async to support any Error type
    • Changed AnyUserData::type_name to return LuaString instead
    • Added UserDataOwned<T> wrapper to take ownership of userdata T and implements FromLua

    Full Changelog: v0.11.6...v0.12.0-rc.1

    Open source →
    Release notes
    • Rust 2024 edition
    • Removed Error::ToLuaConversionError variant as it was unused (and not practically useful)
    • New modules to group data types: chunk, debug, error, function, table, string, state, thread, userdata, luau
    • Support __todebugstring metamethod for pretty formatting userdata value (for debugging)
    • New MaybeSync trait that is required for userdata types
    • Removed lifetime from BorrowedStr and BorrowedBytes
    • New Thread methods: is_resumable, is_running, is_finished, is_error
    • Added Thread::state to get raw Lua state pointer
    • Luau TextRequirer is renamed to FsRequirer
    • GC interface refactor: Lua::gc_inc/Lua::gc_gen is replaced with gc_set_mode
    • Added GcIncParams and GcGenParams for GC tuning
    • New UserDataMethods::add_method_once and UserDataMethods::add_async_method_once
    • Initial Luau integer64 type support
    • Changed interface of Function::wrap/wrap_mut/wrap_async to support any Error type
    • Changed AnyUserData::type_name to return LuaString instead
    • Added UserDataOwned<T> wrapper to take ownership of userdata T and implements FromLua
    Open source →
  4. 0.11.6 27 Jan 2026
    Release notes

    What's Changed

    • Lua 5.5 support under the new lua55 feature flag
    • Luau updated to 0.705+
    • Added AnyUserData::is_proxy
    • Added num_params, num_upvalues, is_vararg to FunctionInfo

    Full Changelog: v0.11.5...v0.11.6

    Lua 5.5 notes

    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.

    Open source →
    Release notes
    • Added Lua 5.5 support (lua55 feature flag)
    • Luau updated to 0.705+
    • Added AnyUserData::is_proxy method to check if userdata is a proxy
    • Added num_params, num_upvalues, is_vararg to FunctionInfo
    Open source →
  5. 0.11.5 23 Nov 2025
    Release notes

    What's Changed

    • Luau updated to 0.701
    • Added Lua::set_memory_category and Lua::heap_dump functions to profile (Luau) memory
    • Added Lua::type_metatable helper to get metatable of a primitive type
    • Added Lua::traceback function to generate stack traces at different levels
    • Added add_method_once /add_async_method_once UserData methods (experimental)
    • Make AnyUserData::type_name public
    • impl IntoLuaMulti for &MultiValue

    Full Changelog: v0.11.4...v0.11.5

    Open source →
    Release notes
    • Luau updated to 0.701
    • Added Lua::set_memory_category and Lua::heap_dump functions to profile (Luau) memory
    • Added Lua::type_metatable helper to get metatable of a primitive type
    • Added Lua::traceback function to generate stack traces at different levels
    • Added add_method_once /add_async_method_once UserData methods (experimental)
    • Make AnyUserData::type_name public
    • impl IntoLuaMulti for &MultiValue
    • Bugfixes and async perf improvements
    Open source →
  6. 0.11.4 29 Sep 2025
    Release notes

    What's Changed

    • Make Value::to_serializable public
    • Added new serde option detect_mixed_tables (to encode mixed array+map tables)
    • Added ObjectLike::get_path helper (for tables and userdata) for easy access of nested data
    • Added (experimental) __namecall optimization for Luau

    Full Changelog: v0.11.3...v0.11.4

    Open source →
    Release notes
    • Make Value::to_serializable public
    • Add new serde option detect_mixed_tables (to encode mixed array+map tables)
    • Add ObjectLike::get_path helper (for tables and userdata)
    Open source →
  7. 0.11.3 30 Aug 2025
    Release notes

    What's Changed

    • Added Lua::yield_with to use as coroutine.yield functional replacement in async functions for any Lua (see doc examples)
    • Do not try to yield at non-yielable points in Luau interrupt (#632)
    • Added Buffer::cursor method (Luau)
    • Added Lua::create_buffer_with_capacity method (Luau)
    • Make Lua reference values cheap to clone in Rust (only increments ref count)
    • Fix panic on large (>67M entries) table creation

    Full Changelog: v0.11.2...v0.11.3

    Open source →
    Release notes
    • Add Lua::yield_with to use as coroutine.yield functional replacement in async functions for any Lua
    • Do not try to yield at non-yielable points in Luau interrupt (#632)
    • Add Buffer::cursor method (Luau)
    • Add Lua::create_buffer_with_capacity method (Luau)
    • Make Lua reference values cheap to clone (only increments ref count)
    • Fix panic on large (>67M entries) table creation
    Open source →
  8. 0.11.2 10 Aug 2025
    Release notes

    What's Changed

    • Faster stack push for Variadic<T>
    • Fix handling Windows paths with drive letter in Luau require (#623) by @piz-ewing
    • Make Luau registered aliases ascii case-insensitive (#620)
    • Fix deserializing negative zeros -0.0 (#618)

    Full Changelog: v0.11.1...v0.11.2

    Open source →
    Release notes
    • Faster stack push for Variadic<T>
    • Fix handling Windows paths with drive letter in Luau require (#623)
    • Make Luau registered aliases ascii case-insensitive (#620)
    • Fix deserializing negative zeros -0.0 (#618)
    Open source →
  9. 0.11.1 15 Jul 2025
    Release notes

    What's Changed

    • Fixed bug exhausting Lua auxiliary stack and leaving it without reserve (#615)
    • Lua::push_c_function now correctly handles OOM for Lua 5.1 and Luau

    Full Changelog: v0.11.0...v0.11.1

    Open source →
    Release notes
    • Fixed bug exhausting Lua auxiliary stack and leaving it without reserve (#615)
    • Lua::push_c_function now correctly handles OOM for Lua 5.1 and Luau
    Open source →
  10. 0.11.0 14 Jul 2025
    Release notes

    What's Changed (since v0.11.0-beta.3)

    • Allow linking external Lua libraries in a build script (e.g. pluto) using external mlua-sys feature flag
    • Lua::inspect_stack takes a callback with &Debug argument, instead of returning Debug directly
    • Added Debug::function method to get function running at a given level
    • Debug::curr_line is deprecated in favour of Debug::current_line that returns Option<usize>
    • Added Lua::set_globals method to replace global environment
    • Table::set_metatable now returns Result<()> (this operation can fail in sandboxed Luau mode)
    • impl ToString replaced with Into<StdString> in UserData registration
    • Value::as_str and Value::as_string_lossy methods are deprecated (as they are non-idiomatic)
    • Bugfixes and improvements

    Full Changelog: v0.11.0-beta.3...v0.11.0

    Open source →
    Release notes

    Changes since v0.11.0-beta.3

    • Allow linking external Lua libraries in a build script (e.g. pluto) using external mlua-sys feature flag
    • Lua::inspect_stack takes a callback with &Debug argument, instead of returning Debug directly
    • Added Debug::function method to get function running at a given level
    • Debug::curr_line is deprecated in favour of Debug::current_line that returns Option<usize>
    • Added Lua::set_globals method to replace global environment
    • Table::set_metatable now returns Result<()> (this operation can fail in sandboxed Luau mode)
    • impl ToString replaced with Into<StdString> in UserData registration
    • Value::as_str and Value::as_string_lossy methods are deprecated (as they are non-idiomatic)
    • Bugfixes and improvements
    Open source →
  11. 0.11.0-beta.3 23 Jun 2025 pre-release
    Release notes
    • Luau in sandboxed mode has reduced options in collectgarbage function (to follow the official doc)
    • Function::deep_clone now returns Result<Function> as this operation can trigger memory errors
    • Luau "Require" resolves included Lua files relative to the current directory (#605)
    • Fixed bug when finalizing AsyncThread on drop (call_async methods family)
    Open source →
  12. 0.11.0-beta.2 12 Jun 2025 pre-release
    Release notes
    • Lua 5.4 updated to 5.4.8
    • Terminate Rust Future when AsyncThread is dropped (without relying on Lua GC)
    • Added loadstring function to Luau
    • Make AsChunk trait dyn-friendly
    • Luau Require trait synced with Luau 0.674
    • Luau Require trait methods now can return Error variant (in NavigateError enum)
    • Added __type to Error's userdata metatable (for typeof function)
    • parking_log/send_guard is moved to userdata-wrappers feature flag
    • New serde feature flag to replace serialize (the old one is still available)
    Open source →
  13. 0.11.0-beta.1 07 May 2025 pre-release
    Release notes
    • New "require-by-string" for Luau (with Require trait and async support)
    • Added Thread::resume_error support for Luau
    • 52 bit integers support for Luau (this is a breaking change)
    • New features for Luau compiler (constants, disabled builtins, known members)
    • AsyncThread<A, R> changed to AsyncThread<R> (A pushed to stack immediately)
    • Lifetime 'a moved from AsChunk<'a> to AsChunk::source where Self: 'a
    • Lua::scope pass &Scope instead of &mut Scope to closure
    • Added global hooks support (Lua 5.1+)
    • Added per-thread hooks support (Lua 5.1+)
    • Lua::init_from_ptr renamed to Lua::get_or_init_from_ptr and returns &Lua
    • Lua:load_from_function is deprecated (this is register_module now)
    • Added Lua::register_module and Lua::preload_module
    Open source →
  14. 0.10.5 24 May 2025

    Nothing published for this version

  15. 0.10.4 05 May 2025 withdrawn
    Release notes
    • Luau updated to 0.672
    • New serde option encode_empty_tables_as_array to serialize empty tables as arrays
    • Added WeakLua and Lua::weak() to create weak references to Lua state
    • Trigger abort when Luau userdata destructors are panic (Luau GC does not support it)
    • Added AnyUserData::type_id() method to get the type id of the userdata
    • Added Chunk::name(), Chunk::environment() and Chunk::mode() functions
    • Support borrowing underlying wrapped types for UserDataRef and UserDataRefMut (under userdata-wrappers feature)
    • Added large (52bit) integers support for Luau
    • Enable serde for bstr if serialize feature flag is enabled
    • Recursive warnings (Lua 5.4) are no longer allowed
    • Implemented IntoLua/FromLua for BorrowedString and BorrowedBytes
    • Implemented IntoLua/FromLua for char
    • Enable Thread::reset() for all Lua versions (limited support for 5.1-5.3)
    • Bugfixes and improvements
    Open source →
  16. 0.10.3 27 Jan 2025
    Release notes
    • Set Default for Value to be Nil
    • Allow exhaustive match on Value (#502)
    • Add Table::set_safeenv method (Luau)
    Open source →
  17. 0.10.2 01 Dec 2024
    Release notes
    • Switch proc-macro-error to proc-macro-error2 (#493)
    • Do not allow Lua to run GC finalizers on ref thread (#491)
    • Fix chunks loading in Luau when memory limit is enforced (#488)
    • Added String::wrap method to wrap arbitrary AsRef<[u8]> into impl IntoLua
    • Better FreeBSD/OpenBSD support (thanks to cos)
    • Delay "any" userdata metatable creation until first instance is created (#482)
    • Reduce amount of generated code for UserData (less generics)
    Open source →
  18. 0.10.1 09 Nov 2024
    Release notes
    • Minimal Luau updated to 0.650
    • Added Luau native vector library support (this can change behavior if you use vector function!)
    • Added Lua String::display method
    • Improved pretty-printing for Lua tables (#478)
    • Added Scope::create_any_userdata to create Lua objects from any non-'static Rust types
    • Added AnyUserData::destroy method
    • New userdata-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)
    • Added Scope::add_destructor to attach custom destructors
    • Added Lua::try_app_data_ref and Lua::try_app_data_mut methods
    • Added From<Vec> and Into<Vec> support to MultiValue and Variadic types
    • Bug fixes and improvements (#477 #479)
    Open source →
  19. 0.10.0 25 Oct 2024
    Release notes

    Changes since v0.10.0-rc.1

    • Added error-send feature flag (disabled by default) to require Send + Sync for Error
    • Some performance improvements
    Open source →
  20. 0.10.0-rc.1 08 Oct 2024 pre-release
    Release notes
    • Lua::scope is back
    • Support yielding from hooks for Lua 5.3+
    • Support setting metatable for Lua builtin types (number/string/function/etc)
    • Added LuaNativeFn/LuaNativeFnMut/LuaNativeAsyncFn traits for using in Function::wrap
    • Added Error::chain method to return iterator over nested errors
    • Added Lua::exec_raw helper to execute low-level Lua C API code
    • Added Either<L, R> enum to combine two types into a single one
    • Added a new Buffer type for Luau
    • Added Value::is_error and Value::as_error helpers
    • Added Value::Other variant to represent unknown Lua types (eg LuaJIT CDATA)
    • Added (optional) anyhow feature to implement IntoLua for anyhow::Error
    • Added IntoLua/FromLua for OsString/OsStr and PathBuf/Path
    Open source →
  21. 0.10.0-beta.2 07 Sep 2024 pre-release
    Release notes
    • Updated 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>).
    • Removed undocumented Lua::into_static/from_static methods.
    • Futures now require Send bound if send feature is enabled.
    • Dropped lifetime from UserDataMethods and UserDataFields traits.
    • Compiler::compile() now returns Result (Luau).
    • Removed Clone requirement from UserDataFields::add_field().
    • TableExt and AnyUserDataExt traits were combined into ObjectLike trait.
    • Disabled send feature in module mode (since we don't have exclusive access to Lua).
    • Chunk::set_environment() takes Table instead of IntoLua type.
    • Reduced the compile time contribution of next_key_seed and next_value_seed.
    • Reduced the compile time contribution of serde_userdata.
    • Performance improvements.
    Open source →
  22. 0.10.0-beta.1 31 Jul 2024 pre-release
    Release notes
    • Dropped 'lua lifetime (subtypes now store a weak reference to Lua)
    • Removed (experimental) owned types (they no longer needed)
    • Make Lua types truly Send and Sync (when enabling send feature flag)
    • Removed UserData impl for Rc/Arc types ("any" userdata functions can be used instead)
    • Lua::replace_registry_value takes &mut RegistryKey
    • Lua::scope temporary disabled (will be re-added in the next release)
    Open source →
  23. 0.9.9 18 Jun 2024
    Release notes
    • Minimal Luau updated to 0.629
    • Fixed bug when attempting to reset or resume already running coroutines (#416).
    • Added RegistryKey::id() method to get the underlying Lua registry key id.
    Open source →
  24. 0.9.8 15 May 2024
    Release notes
    • Fixed serializing same table multiple times (#408)
    • Use mlua-sys v0.6 (to support Luau 0.624+)
    • Fixed cross compilation of windows dlls from unix (#394)
    Open source →
  25. 0.9.7 05 Apr 2024
    Release notes
    • Implemented IntoLua for RegistryKey
    • Mark __idiv metamethod as available for luau
    • Added Function::deep_clone() method (Luau)
    • Added SerializeOptions::detect_serde_json_arbitrary_precision option
    • Added Lua::create_buffer() method (Luau)
    • Support serializing buffer type as a byte slice (Luau)
    • Perf: Implemented push_into_stack/from_stack for Option<T>
    • Added Lua::create_ser_any_userdata() method
    Open source →
  26. 0.9.6 29 Feb 2024
    Release notes
    • Added to_pointer function to Function/Table/Thread
    • Implemented IntoLua for &Value
    • Implemented FromLua for RegistryKey
    • Faster (~5%) table array traversal during serialization
    • Some performance improvements for bool/int types
    Open source →
  27. 0.9.5 25 Jan 2024
    Release notes
    • Minimal Luau updated to 0.609
    • Luau max stack size increased to 1M (from 100K)
    • Implemented IntoLua for refs to String/Table/Function/AnyUserData/Thread + RegistryKey
    • Implemented IntoLua and FromLua for OwnedThread/OwnedString
    • Fixed FromLua derive proc macro to cover more cases
    Open source →
  28. 0.9.4 11 Jan 2024
    Release notes
    • Fixed loading all-in-one modules under mixed states (eg. main state and coroutines)
    Open source →
  29. 0.9.3 09 Jan 2024
    Release notes
    • WebAssembly support (wasm32-unknown-emscripten target)
    • Performance improvements (faster Lua function calls for lua51/jit/luau)
    Open source →
  30. 0.9.2 22 Nov 2023
    Release notes
    • Added binary modules support to Luau
    • Added Luau package module (uses StdLib::PACKAGE) with loaders (follows lua5.1 interface)
    • Added support of Luau 0.601+ buffer type (represented as userdata in Rust)
    • LuaJIT cdata type is also represented as userdata in Rust (instead of panic)
    • Vendored LuaJIT switched to rolling vanilla (from openresty)
    • Added Table::for_each method for fast table pairs traversal (faster than pairs)
    • Performance improvements around table traversal (and faster serialization)
    • Bug fixes and improvements
    Open source →
  31. 0.9.1 24 Aug 2023
    Release notes
    • impl Default for Lua
    • impl IntoLuaMulti for std::result::Result<(), E>
    • Fix using wrong userdata index after processing Variadic args (#311)
    Open source →
  32. 0.9.0 17 Aug 2023
    Release notes

    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 (unstable feature flag)
    • Added OwnedThread type (unstable feature flag)
    • Minimal Luau updated to 0.590
    • Added new option sort_keys to DeserializeOptions (Lua::from_value() method)
    • Changed Table::raw_len() output type to usize
    • Helper functions for Value (eg: Value::as_number()/Value::as_string/etc)
    • Performance improvements
    Open source →
  33. 0.9.0-rc.3 28 Jul 2023 pre-release
    Release notes
    • Minimal Luau updated to 0.588
    Open source →
  34. 0.9.0-rc.2 28 Jul 2023 pre-release
    Release notes
    • Added #[derive(FromLua)] macro to opt-in into FromLua<T> where T: 'static + Clone (userdata type).
    • Support vendored module mode for windows (raw-dylib linking, Rust 1.71+)
    • module and vendored features are now mutually exclusive
    • Use C-unwind ABI (Rust 1.71+)
    • Changed AsChunk trait to support capturing wrapped Lua types
    Open source →
  35. 0.9.0-rc.1 11 Jul 2023 pre-release
    Release notes
    • UserDataMethods::add_async_method() takes &T instead of cloning T
    • Implemented PartialEq<[T]> for tables
    • Added Luau 4-dimensional vectors support (luau-vector4 feature)
    • Table::sequence_values() iterator no longer uses any metamethods (Table::raw_sequence_values() is deprecated)
    • Added Table:is_empty() function that checks both hash and array parts
    • Refactored Debug interface
    • Re-exported ffi (mlua-sys) crate for easier writing of unsafe code
    • Refactored Lua 5.4 warnings interface
    • Take &str as function name in TableExt and AnyUserDataExt traits
    • Added module attribule skip_memory_check to improve performance
    • Added AnyUserData::wrap() to provide more easy way of creating any userdata in Lua
    Open source →
  36. 0.9.0-beta.3 07 Jun 2023 pre-release
    Release notes
    • Added OwnedAnyUserData::take()
    • Switch to DeserializeOwned
    • Overwrite error context when called multiple times
    • New feature flag luau-jit to enable (experimental) Luau codegen backend
    • Set __name field in userdata metatable
    • Added Value::to_string() method similar to luaL_tolstring
    • Lua 5.4.6
    • Application data container now allows to mutably and immutably borrow different types at the same time
    • Performance optimizations
    • Support getting and setting environment for Lua functions.
    • Added UserDataFields::add_field() method to add static fields to UserData

    Breaking changes:

    • Require environment to be a Table instead of Value in Chunks.
    • AsChunk::env() renamed to AsChunk::environment()
    Open source →
  37. 0.9.0-beta.2 27 Apr 2023 pre-release
    Release notes

    New features:

    • Added Thread::set_hook() function to set hook on threads
    • Added pretty print to the Debug formatting to Lua Value and Table
    • ffi layer moved to mlua-sys crate
    • Added OwnedString (unstable)

    Breaking changes:

    • Refactor HookTriggers (make it const)
    Open source →
  38. 0.9.0-beta.1 31 Mar 2023 pre-release
    Release notes

    New features:

    • Owned Lua types (unstable feature flag)
    • New functions Function::wrap/Function::wrap_mut/Function::wrap_async
    • Lua::register_userdata_type() to register a custom userdata types (without requiring UserData trait)
    • Lua::create_any_userdata()
    • Added create_userdata_ref/create_userdata_ref_mut for scopes
    • Added AnyUserDataExt trait with auxiliary functions for AnyUserData
    • Added UserDataRef and UserDataRefMut type wrapped that implement FromLua
    • Improved error handling:
      • Improved error reporting when calling Rust functions from Lua.
      • Added Error::BadArgument to help identify bad argument position or name
      • Added ErrorContext extension trait to attach additional context to Error

    Breaking changes:

    • Refactored AsChunk trait
    • ToLua/ToLuaMulti renamed to IntoLua/IntoLuaMulti
    • Renamed to_lua_err to into_lua_err
    • Removed FromLua impl for T: UserData+Clone
    • Removed Lua::async_scope
    • Added &Lua arg to Luau interrupt callback

    Other:

    • Better Debug for String
    • Allow deserializing values from serializable UserData using Lua::from_value() method
    • Added Table::clear() method
    • Added Error::downcast_ref() method
    • Support setting memory limit for Lua 5.1/JIT/Luau
    • Support setting module name in #[lua_module(name = "...")] macro
    • Minor fixes and improvements
    Open source →
  39. 0.8.10 17 Aug 2023
    Release notes
    • Update to Luau 0.590 (luau0-src to 0.7.x)
    • Fix loading luau code starting with \t
    • Pin lua-src and luajit-src versions
    Open source →
  40. 0.8.9 16 May 2023
    Release notes
    • Update minimal (vendored) Lua 5.4 to 5.4.6
    • Use lua_closethread instead of lua_resetthread in vendored mode (Lua 5.4.6)
    • Allow deserializing Lua null into unit (()) or unit struct.
    Open source →
  41. 0.8.8 05 Mar 2023
    Release notes
    • Fix potential deadlock when trying to reuse dropped registry keys.
    • Optimize userdata methods call when __index and fields_getters are nil
    Open source →
  42. 0.8.7 04 Jan 2023
    Release notes
    • Minimum Luau updated to 0.555 (LUAI_MAXCSTACK limit increased to 100000)
    • _VERSION in Luau now includes version number
    • Fixed lifetime of DebugNames in Debug::names() and DebugSource in Debug::source()
    • Fixed subtraction overflow when calculating index for MultiValue::get()
    Open source →
  43. 0.8.6 11 Nov 2022
    Release notes
    • Fixed bug when recycled Registry slot can be set to Nil
    Open source →
  44. 0.8.5 30 Oct 2022
    Release notes
    • Fixed potential unsoundness when using Layout::from_size_align_unchecked and Rust 1.65+
    • Performance optimizations around string and table creation in standalone mode
    • Added fast track path to Table get/set/len methods without metatable
    • Added new methods push/pop/raw_push/raw_pop to Table
    • Fix getting caller information from Lua::load
    • Better checks and tests when trying to modify a Luau readonly table
    Open source →
  45. 0.8.4 09 Oct 2022
    Release notes
    • Minimal Luau updated to 0.548
    Open source →
  46. 0.8.3 02 Aug 2022
    Release notes
    • 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)
    Open source →
  47. 0.8.2 25 Jul 2022
    Release notes
    • Performance optimizations in handling UserData
    • Minimal Luau updated to 0.536
    • Fixed bug in Function::bind when passing empty binds and no arguments (#189)
    Open source →
  48. 0.8.1 29 Jun 2022
    Release notes
    • Added Lua::create_proxy for accessing to UserData static fields and functions without instance
    • Added Table::to_pointer() and String::to_pointer() functions
    • Bugfixes and improvements (#176 #179)
    Open source →
  49. 0.8.0 09 Jun 2022
    Release notes

    Changes since 0.7.4

    • Luau support
    • Removed C glue
    • Added async support to __index and __newindex metamethods
    • Added Function::info() to get information about functions (#149).
    • Added parking_lot dependency under feature flag (for UserData)
    • Hash implementation for Lua String
    • Added Value::to_pointer() function
    • Performance improvements

    Breaking changes:

    • Refactored AsChunk trait (added implementation for Path and PathBuf).
    Open source →
  50. 0.8.0-beta.5 25 May 2022 pre-release
    Release notes
    • Lua sources no longer needed to build modules
    • Added __iter metamethod for Luau
    • Added Value::to_pointer() function
    • Added Function::coverage for Luau to obtain coverage report
    • Bugfixes and improvements (#153 #161 #168)
    Open source →
  51. 0.8.0-beta.4 25 Apr 2022 pre-release
    Release notes
    • Removed &Lua from Lua::set_interrupt as it's not safe (introduced in v0.8.0-beta.3)
    • Enabled Lua::gc_inc for Luau
    • Luau debug module marked as safe (enabled by default)
    • Implemented Hash for Lua String
    • Support mode options in collectgarbage for Luau
    • Added ability to set global Luau compiler (used for loading all chunks).
    • Refactored AsChunk trait (breaking changes). AsChunk now implemented for Path and PathBuf to load lua files from fs.
    • Added parking_lot dependency and feature flag (for UserData)
    • Added Function::info() to get information about functions (#149).
    • Bugfixes and improvements (#104 #142)
    Open source →
  52. 0.8.0-beta.3 03 Apr 2022 pre-release
    Release notes
    • Luau vector constructor
    • Luau sandboxing support
    • Luau interrupts (yieldable)
    • More Luau compiler options (mutable globals)
    • Other performance improvements
    Open source →
  53. 0.8.0-beta.2 25 Mar 2022 pre-release
    Release notes
    • Luau vector datatype support
    • Luau readonly table attribute
    • Other Luau improvements
    Open source →
  54. 0.8.0-beta.1 22 Mar 2022 pre-release
    Release notes
    • Luau support
    • Refactored ffi module. C glue is no longer required
    • Added async support to __index and __newindex metamethods
    Open source →
  55. 0.7.4 01 Mar 2022
    Release notes
    • Improved Lua::create_registry_value to reuse previously expired registry keys. No need to call Lua::expire_registry_values when creating/dropping registry values.
    • Added Lua::replace_registry_value to change value of an existing Registry Key
    • Async calls optimization
    Open source →
  56. 0.7.3 19 Jan 2022
    Release notes
    • Fixed cross-compilation issue (introduced in 84a174c)
    Open source →
  57. 0.7.2 17 Jan 2022
    Release notes
    • Allow pkg-config to omit include paths if they equals to standard (#114).
    • Various bugfixes (eg. #121)
    Open source →
  58. 0.7.1 24 Dec 2021
    Release notes
    • Fixed traceback generation for errors (#112)
    • Lua::into_static/from_static methods have been removed from the docs and are discouraged for use
    Open source →
  59. 0.7.0 25 Nov 2021
    Release notes
    • New "application data" api to store arbitrary objects inside Lua
    • New feature flag luajit52 to 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_value to AnyUserData for all Lua versions
    • Added set_named_user_value/get_named_user_value to AnyUserData for all Lua versions
    • Added Lua::inspect_stack() to get information about the interpreter runtime stack
    • Added set_warning_function/remove_warning_function/warning functions to Lua for 5.4
    • Added TableExt::call() to call tables with __call metamethod as functions
    • Added Lua::unload() to unload modules
    • ToLua implementation 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::Serialize for Lua Tables
    • Improved errors reporting. Now source included to fmt::Display implementation for Error::CallbackError
    • Major performance improvements
    Open source →
  60. 0.6.6 12 Oct 2021
    Release notes
    • Fixed calculating LUA_REGISTRYINDEX when cross-compiling for lua51/jit (#82)
    • Updated documentation & examples
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive