Use simple optimization for rhai-run.

This commit is contained in:
Stephen Chung 2022-08-26 11:23:16 +08:00
parent b36f746dbe
commit 296d5c054c
2 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ Bug fixes
* API for registering property getters/setters and indexers to an `Engine` now works with functions that take a first parameter of `NativeCallContext`.
* Missing API function `Module::set_getter_setter_fn` is added.
* To avoid subtle errors, simple optimization is used for `rhai-run`; previous it was full optimization.
Deprecated API
--------------

View File

@ -51,7 +51,7 @@ fn main() {
let mut engine = Engine::new();
#[cfg(not(feature = "no_optimize"))]
engine.set_optimization_level(rhai::OptimizationLevel::Full);
engine.set_optimization_level(rhai::OptimizationLevel::Simple);
let mut f = match File::open(&filename) {
Err(err) => {