From 9f88ca191e7de2ca6f62f923dd8c385f7fbd4506 Mon Sep 17 00:00:00 2001 From: Alex Orlenko Date: Fri, 25 Oct 2024 12:57:21 +0200 Subject: [PATCH] v0.10.0 --- CHANGELOG.md | 7 +++++++ Cargo.toml | 4 ++-- README.md | 8 +++----- docs/release_notes/v0.10.md | 8 ++++++++ mlua_derive/Cargo.toml | 2 +- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 787825d1..4ea64484 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## v0.10.0 (Oct 25th, 2024) + +Changes since v0.10.0-rc.1 + +- Added `error-send` feature flag (disabled by default) to require `Send + Sync` for `Error` +- Some performance improvements + ## v0.10.0-rc.1 - `Lua::scope` is back diff --git a/Cargo.toml b/Cargo.toml index 141f11d4..988cad29 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mlua" -version = "0.10.0-rc.1" # remember to update mlua_derive +version = "0.10.0" # remember to update mlua_derive authors = ["Aleksandr Orlenko ", "kyren "] rust-version = "1.79.0" edition = "2021" @@ -45,7 +45,7 @@ macros = ["mlua_derive/macros"] anyhow = ["dep:anyhow", "error-send"] [dependencies] -mlua_derive = { version = "=0.10.0-rc.1", optional = true, path = "mlua_derive" } +mlua_derive = { version = "=0.10.0", optional = true, path = "mlua_derive" } bstr = { version = "1.0", features = ["std"], default-features = false } either = "1.0" num-traits = { version = "0.2.14" } diff --git a/README.md b/README.md index 5bd01572..c7035f22 100644 --- a/README.md +++ b/README.md @@ -17,11 +17,9 @@ [Benchmarks]: https://github.com/khvzak/script-bench-rs [FAQ]: FAQ.md -# The main branch is the v0.10, development version of `mlua`. Please see the [v0.9](https://github.com/mlua-rs/mlua/tree/v0.9) branch for the stable versions of `mlua`. - > **Note** > -> See (upcoming) v0.10 [release notes](https://github.com/khvzak/mlua/blob/main/docs/release_notes/v0.10.md). +> See v0.10 [release notes](https://github.com/khvzak/mlua/blob/main/docs/release_notes/v0.10.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. @@ -134,7 +132,7 @@ Add to `Cargo.toml` : ``` toml [dependencies] -mlua = { version = "0.10.0-rc.1", features = ["lua54", "vendored"] } +mlua = { version = "0.10.0", features = ["lua54", "vendored"] } ``` `main.rs` @@ -169,7 +167,7 @@ Add to `Cargo.toml` : crate-type = ["cdylib"] [dependencies] -mlua = { version = "0.10.0-rc.1", features = ["lua54", "module"] } +mlua = { version = "0.10.0", features = ["lua54", "module"] } ``` `lib.rs` : diff --git a/docs/release_notes/v0.10.md b/docs/release_notes/v0.10.md index 466929d7..f130e45d 100644 --- a/docs/release_notes/v0.10.md +++ b/docs/release_notes/v0.10.md @@ -121,3 +121,11 @@ assert_eq!(sum, 15); ``` The `exec_raw` method is longjmp-safe. It's not recommended to move `Drop` types into the closure to avoid possible memory leaks. + +#### `anyhow` feature flag + +The new `anyhow` feature flag adds `IntoLua` and `Into` implementation for the `anyhow::Error` type. + +```rust +let f = lua.create_function(|_, ()| { anyhow!("error message"); Ok(()) })?; +``` diff --git a/mlua_derive/Cargo.toml b/mlua_derive/Cargo.toml index c17ae158..773351e7 100644 --- a/mlua_derive/Cargo.toml +++ b/mlua_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mlua_derive" -version = "0.10.0-rc.1" +version = "0.10.0" authors = ["Aleksandr Orlenko "] edition = "2021" description = "Procedural macros for the mlua crate."