summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Orlenko <zxteam@protonmail.com>2024-01-18 22:18:48 +0000
committerAlex Orlenko <zxteam@protonmail.com>2024-01-18 23:05:23 +0000
commita38e484fe9a84b15ec64c9518252046381d669df (patch)
tree5db532c887756b6c9bb54577b1a1615214c43f56
parenteed48889cd3e9ba5f98591d0412df41218a618ef (diff)
downloadmlua-a38e484fe9a84b15ec64c9518252046381d669df.zip
Increase luau max stack size to 1M from 100k
-rw-r--r--mlua-sys/build/find_vendored.rs1
-rw-r--r--mlua-sys/src/luau/lua.rs2
2 files changed, 2 insertions, 1 deletions
diff --git a/mlua-sys/build/find_vendored.rs b/mlua-sys/build/find_vendored.rs
index a00c286..e3ddbec 100644
--- a/mlua-sys/build/find_vendored.rs
+++ b/mlua-sys/build/find_vendored.rs
@@ -21,6 +21,7 @@ pub fn probe_lua() {
#[cfg(feature = "luau")]
let artifacts = luau0_src::Build::new()
.enable_codegen(cfg!(feature = "luau-codegen"))
+ .set_max_cstack_size(1000000)
.set_vector_size(if cfg!(feature = "luau-vector4") { 4 } else { 3 })
.build();
diff --git a/mlua-sys/src/luau/lua.rs b/mlua-sys/src/luau/lua.rs
index 2da5690..43aebf1 100644
--- a/mlua-sys/src/luau/lua.rs
+++ b/mlua-sys/src/luau/lua.rs
@@ -8,7 +8,7 @@ use std::{mem, ptr};
pub const LUA_MULTRET: c_int = -1;
// Max number of Lua stack slots
-const LUAI_MAXCSTACK: c_int = 100000;
+const LUAI_MAXCSTACK: c_int = 1000000;
//
// Pseudo-indices