From 6fa0a78ec00f1bc541c7c918373bf848b72c72c9 Mon Sep 17 00:00:00 2001 From: Alex Orlenko Date: Thu, 30 Mar 2023 23:18:10 +0100 Subject: [PATCH] Prepare v0.9.0-beta.1 --- CHANGELOG.md | 32 ++++++++++++++++++++++++++++++++ Cargo.toml | 6 +++--- mlua_derive/Cargo.toml | 2 +- src/lib.rs | 2 +- 4 files changed, 37 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2043c9d..812be09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,35 @@ +## v0.9.0-beta.1 + +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 + ## v0.8.8 - Fix potential deadlock when trying to reuse dropped registry keys. diff --git a/Cargo.toml b/Cargo.toml index 54d8c21..f61ea1f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mlua" -version = "0.8.8" # remember to update html_root_url and mlua_derive +version = "0.9.0-beta.1" # remember to update html_root_url and mlua_derive authors = ["Aleksandr Orlenko ", "kyren "] edition = "2021" repository = "https://github.com/khvzak/mlua" @@ -17,7 +17,7 @@ with async/await features and support of writing native Lua modules in Rust. """ [package.metadata.docs.rs] -features = ["lua54", "vendored", "async", "send", "serialize", "macros", "parking_lot"] +features = ["lua54", "vendored", "async", "send", "serialize", "macros", "parking_lot", "unstable"] rustdoc-args = ["--cfg", "docsrs"] [workspace] @@ -42,7 +42,7 @@ macros = ["mlua_derive/macros"] unstable = [] [dependencies] -mlua_derive = { version = "=0.8.0", optional = true, path = "mlua_derive" } +mlua_derive = { version = "=0.9.0-beta.1", optional = true, path = "mlua_derive" } bstr = { version = "1.0", features = ["std"], default_features = false } once_cell = { version = "1.0" } num-traits = { version = "0.2.14" } diff --git a/mlua_derive/Cargo.toml b/mlua_derive/Cargo.toml index 4ee07d1..e94f8db 100644 --- a/mlua_derive/Cargo.toml +++ b/mlua_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mlua_derive" -version = "0.8.0" +version = "0.9.0-beta.1" authors = ["Aleksandr Orlenko "] edition = "2021" description = "Procedural macros for the mlua crate." diff --git a/src/lib.rs b/src/lib.rs index 2927445..3bffb03 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -72,7 +72,7 @@ //! [`serde::Deserialize`]: https://docs.serde.rs/serde/de/trait.Deserialize.html // mlua types in rustdoc of other crates get linked to here. -#![doc(html_root_url = "https://docs.rs/mlua/0.8.8")] +#![doc(html_root_url = "https://docs.rs/mlua/0.9.0-beta.1")] // Deny warnings inside doc tests / examples. When this isn't present, rustdoc doesn't show *any* // warnings at all. #![doc(test(attr(deny(warnings))))]