diff --git a/CHANGELOG.md b/CHANGELOG.md index f2dcb929..903e8ace 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## v0.9.0 + +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 + ## v0.9.0-rc.3 - Minimal Luau updated to 0.588 @@ -85,6 +99,18 @@ Other: - Support setting module name in `#[lua_module(name = "...")]` macro - Minor fixes and improvements +## v0.8.10 + +- 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 + +## v0.8.9 + +- 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. + ## v0.8.8 - Fix potential deadlock when trying to reuse dropped registry keys. diff --git a/Cargo.toml b/Cargo.toml index 6642ed47..e55f02de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mlua" -version = "0.9.0-rc.3" # remember to update mlua_derive +version = "0.9.0" # remember to update mlua_derive authors = ["Aleksandr Orlenko ", "kyren "] rust-version = "1.71" edition = "2021" diff --git a/README.md b/README.md index f91d0c29..f35f3999 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,7 @@ > **Note** > -> Please see the [v0.8](https://github.com/khvzak/mlua/tree/v0.8) branch for the stable versions of `mlua` released to crates.io. -> -> v0.9 release notes can be found [here](https://github.com/khvzak/mlua/blob/master/docs/release_notes/v0.9.md). +> See v0.9 [release notes](https://github.com/khvzak/mlua/blob/master/docs/release_notes/v0.9.md). `mlua` is bindings to [Lua](https://www.lua.org) programming language for Rust with a goal to provide _safe_ (as far as it's possible), high level, easy to use, practical and flexible API. @@ -47,7 +45,7 @@ Below is a list of the available feature flags. By default `mlua` does not enabl * `luajit`: activate [LuaJIT] support * `luajit52`: activate [LuaJIT] support with partial compatibility with Lua 5.2 * `luau`: activate [Luau] support (auto vendored mode) -* `luau-jit`: activate [Luau] support with experimental JIT backend. +* `luau-jit`: activate [Luau] support with JIT backend. * `luau-vector4`: activate [Luau] support with 4-dimensional vector. * `vendored`: build static Lua(JIT) library from sources during `mlua` compilation using [lua-src] or [luajit-src] crates * `module`: enable module mode (building loadable `cdylib` library for Lua) @@ -119,7 +117,7 @@ Add to `Cargo.toml` : ``` toml [dependencies] -mlua = { version = "0.9.0-rc.3", features = ["lua54", "vendored"] } +mlua = { version = "0.9.0", features = ["lua54", "vendored"] } ``` `main.rs` @@ -154,7 +152,7 @@ Add to `Cargo.toml` : crate-type = ["cdylib"] [dependencies] -mlua = { version = "0.9.0-rc.3", features = ["lua54", "vendored", "module"] } +mlua = { version = "0.9.0", features = ["lua54", "vendored", "module"] } ``` `lib.rs` : diff --git a/docs/release_notes/v0.9.md b/docs/release_notes/v0.9.md index 80db3065..93f811e1 100644 --- a/docs/release_notes/v0.9.md +++ b/docs/release_notes/v0.9.md @@ -83,7 +83,7 @@ println!("{s}!"); One of the common questions was how to embed a Lua type into Rust struct to use it later. It was non-trivial to do because of the `'lua` lifetime attached to every Lua value. -In v0.9 mlua introduces "owned" types `OwnedTable`/`OwnedFunction`/`OwnedString`/`OwnedAnyUserData` that are `'static` (no lifetime attached). +In v0.9 mlua introduces "owned" types `OwnedTable`/`OwnedFunction`/`OwnedString`/`OwnedAnyUserData`/ `OwnedThread`that are `'static` (no lifetime attached). ```rust let lua = Lua::new(); @@ -141,7 +141,7 @@ unsafe { #### Luau JIT support -mlua brings support for the new experimental [Luau] JIT backend under the `luau-jit` feature flag. +mlua brings support for the new [Luau] JIT backend under the `luau-jit` feature flag. It will automatically trigger JIT compilation for new Lua chunks. To disable it, just call `lua.enable_jit(false)` before loading Lua code (but any previously compiled chunks will remain JIT-compiled).