Skip to content

Commit

Permalink
Add execution limits
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexagon committed Aug 22, 2023
1 parent 4a3419b commit 4d59379
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion fift-wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ impl FiftState {

let context = fift::Context::new(env_writer_ref, output_writer_ref)
.with_basic_modules()
.handle_error()?;
.handle_error()?
.with_limits(fift::core::ExecutionLimits {
max_steps: Some(10_000_000),
max_include_depth: Some(100),
});

Ok(FiftState {
context,
Expand Down

0 comments on commit 4d59379

Please sign in to comment.