Skip to content

Commit

Permalink
v0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
khvzak committed Oct 25, 2024
1 parent 35fa762 commit 4f56575
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>", "kyren <[email protected]>"]
rust-version = "1.79.0"
edition = "2021"
Expand Down Expand Up @@ -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" }
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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`
Expand Down Expand Up @@ -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` :
Expand Down
11 changes: 11 additions & 0 deletions docs/release_notes/v0.10.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,14 @@ 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<mlua::Error>` implementation for the `anyhow::Error` type.

```rust
let f = lua.create_function(|_, ()| {
Err(anyhow!("error message"))?;
Ok(())
})?;
```
2 changes: 1 addition & 1 deletion mlua_derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mlua_derive"
version = "0.10.0-rc.1"
version = "0.10.0"
authors = ["Aleksandr Orlenko <[email protected]>"]
edition = "2021"
description = "Procedural macros for the mlua crate."
Expand Down

0 comments on commit 4f56575

Please sign in to comment.