Skip to content

Releases: mlua-rs/mlua

v0.11.2

10 Aug 09:47
3516f4c
Compare
Choose a tag to compare

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

v0.11.1

15 Jul 22:23
78331ce
Compare
Choose a tag to compare

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

v0.11.0

14 Jul 15:14
928d94d
Compare
Choose a tag to compare

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

v0.11.0-beta.3

23 Jun 23:12
58953e5
Compare
Choose a tag to compare
v0.11.0-beta.3 Pre-release
Pre-release

What's Changed

  • 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 fail with OOM
  • Luau "Require" resolves included Lua files relative to the current directory (#605)
  • Fixed bug when finalizing AsyncThread on drop (call_async methods family)

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

v0.11.0-beta.2

12 Jun 15:17
9c24c99
Compare
Choose a tag to compare
v0.11.0-beta.2 Pre-release
Pre-release

What's Changed

  • 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)

Full Changelog: v0.11.0-beta.1...v0.11.0-beta.2

v0.10.5

24 May 12:39
31efd0c
Compare
Choose a tag to compare

What's Changed

  • mlua-sys is back to v0.6.x (Luau 0.663)
  • Reverted: Trigger abort when Luau userdata destructors are panic (requires new mlua-sys)
  • Reverted: Added large (52bit) integers support for Luau (breaking change)

Full Changelog: v0.10.4...v0.10.5

v0.11.0-beta.1

07 May 11:55
9b45663
Compare
Choose a tag to compare
v0.11.0-beta.1 Pre-release
Pre-release

What's Changed

  • 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
  • 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

Full Changelog: v0.10.4...v0.11.0-beta.1

v0.10.4

05 May 15:07
4ff677f
Compare
Choose a tag to compare

What's Changed

yanked because of breaking semver (large integers for Luau changed type from i32 to i64)

  • Luau updated to 0.672
  • New serde option encode_empty_tables_as_array to serialize empty tables as array
  • Added WeakLua and Lua::weak() to create weak references to Lua state
  • Trigger abort when Luau userdata destructors are panicing (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

Full Changelog: v0.10.3...v0.10.4

v0.10.2

01 Dec 13:52
6f6cda0
Compare
Choose a tag to compare

What's Changed

  • Switch proc-macro-error to proc-macro-error2 by @evie-calico in #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)

Full Changelog: v0.10.1...v0.10.2

v0.10.1

09 Nov 21:52
c926327
Compare
Choose a tag to compare

What's Changed

  • 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)

New Contributors