Skip to content

Commit

Permalink
v0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
khvzak committed Aug 17, 2023
1 parent 60f1c16 commit bb0a607
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 9 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <zxteam@pm.me>", "kyren <catherine@chucklefish.org>"]
rust-version = "1.71"
edition = "2021"
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)
Expand Down Expand Up @@ -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`
Expand Down Expand Up @@ -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` :
Expand Down
4 changes: 2 additions & 2 deletions docs/release_notes/v0.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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).
Expand Down

0 comments on commit bb0a607

Please sign in to comment.