Skip to content

Commit

Permalink
change RuntimeInner.create() to set a default compiler with O2
Browse files Browse the repository at this point in the history
  • Loading branch information
green-real committed Oct 25, 2024
1 parent c935149 commit c406f0a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/lune/src/rt/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ use std::{
},
};

use mlua::prelude::*;
use mlua::{
prelude::*,
Compiler,
};
use mlua_luau_scheduler::{Functions, Scheduler};
use self_cell::self_cell;

Expand All @@ -30,6 +33,10 @@ impl RuntimeInner {
fn create() -> LuaResult<Self> {
let lua = Rc::new(Lua::new());

let compiler = Compiler::new()
.set_optimization_level(2);

lua.set_compiler(compiler);
lua.set_app_data(Rc::downgrade(&lua));
lua.set_app_data(Vec::<String>::new());

Expand Down

0 comments on commit c406f0a

Please sign in to comment.