diff --git a/crates/cli-flags/src/lib.rs b/crates/cli-flags/src/lib.rs index 058522bbb9..e4066edb9d 100644 --- a/crates/cli-flags/src/lib.rs +++ b/crates/cli-flags/src/lib.rs @@ -229,6 +229,11 @@ pub struct CommonOptions { #[cfg(feature = "pooling-allocator")] #[clap(long)] pub pooling_allocator: bool, + + /// Maximum stack size, in bytes, that wasm is allowed to consumed before a + /// stack overflow is reported. + #[clap(long)] + pub max_wasm_stack: Option, } impl CommonOptions { @@ -335,6 +340,10 @@ impl CommonOptions { } } + if let Some(max) = self.max_wasm_stack { + config.max_wasm_stack(max); + } + Ok(config) }