From a85e757d4d62a3265dbbfa4e3e62d3a2e1349098 Mon Sep 17 00:00:00 2001 From: Alex Orlenko Date: Fri, 28 Jul 2023 18:30:31 +0100 Subject: [PATCH] Bump luau-src to v0.6.0+luau588 This release has better codegen support (and breaking changed unfortunately) --- README.md | 2 +- docs/release_notes/v0.9.md | 2 +- mlua-sys/Cargo.toml | 4 ++-- mlua-sys/src/luau/luacode.rs | 1 + src/chunk.rs | 1 + 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5dd940a..782dde3 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,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. This is unstable feature and not recommended to use. +* `luau-jit`: activate [Luau] support with experimental 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) diff --git a/docs/release_notes/v0.9.md b/docs/release_notes/v0.9.md index d735406..1bb573f 100644 --- a/docs/release_notes/v0.9.md +++ b/docs/release_notes/v0.9.md @@ -141,7 +141,7 @@ unsafe { #### Luau JIT support -mlua brings support for the new experimental [Luau] JIT backend under the `luau-jit` feature flag. This backend is still under development and not yet ready for production use. +mlua brings support for the new experimental [Luau] JIT backend under the `luau-jit` feature flag. To enable it, just call `lua.enable_jit(true)` before loading Lua code. mlua will automatically trigger JIT compilation for new Lua chunks. diff --git a/mlua-sys/Cargo.toml b/mlua-sys/Cargo.toml index 66aafa3..0454414 100644 --- a/mlua-sys/Cargo.toml +++ b/mlua-sys/Cargo.toml @@ -38,5 +38,5 @@ cc = "1.0" cfg-if = "1.0" pkg-config = "0.3.17" lua-src = { version = ">= 546.0.0, < 546.1.0", optional = true } -luajit-src = { version = ">= 210.4.6, < 210.6.0", optional = true } -luau0-src = { version = "0.5.11", optional = true } +luajit-src = { version = ">= 210.4.6, < 210.5.0", optional = true } +luau0-src = { version = "0.6.0", optional = true } diff --git a/mlua-sys/src/luau/luacode.rs b/mlua-sys/src/luau/luacode.rs index 60ceaeb..ad18a93 100644 --- a/mlua-sys/src/luau/luacode.rs +++ b/mlua-sys/src/luau/luacode.rs @@ -10,6 +10,7 @@ pub struct lua_CompileOptions { pub coverageLevel: c_int, pub vectorLib: *const c_char, pub vectorCtor: *const c_char, + pub vectorType: *const c_char, pub mutableGlobals: *mut *const c_char, } diff --git a/src/chunk.rs b/src/chunk.rs index 3d7d726..e822815 100644 --- a/src/chunk.rs +++ b/src/chunk.rs @@ -244,6 +244,7 @@ impl Compiler { coverageLevel: self.coverage_level as c_int, vectorLib: vector_lib.map_or(ptr::null(), |s| s.as_ptr()), vectorCtor: vector_ctor.map_or(ptr::null(), |s| s.as_ptr()), + vectorType: ptr::null(), mutableGlobals: mutable_globals_ptr, }; ffi::luau_compile(source.as_ref(), options)