Add a --dynamic-memory-reserved-for-growth CLI flag (#5980)
Maps to the corresponding `wasmtime::Config` option. The motivation here is largely completeness and was something I was looking into with the failures in #5970
This commit is contained in:
@@ -196,6 +196,11 @@ pub struct CommonOptions {
|
||||
#[clap(long, value_name = "SIZE")]
|
||||
pub dynamic_memory_guard_size: Option<u64>,
|
||||
|
||||
/// Bytes to reserve at the end of linear memory for growth for dynamic
|
||||
/// memories.
|
||||
#[clap(long, value_name = "SIZE")]
|
||||
pub dynamic_memory_reserved_for_growth: Option<u64>,
|
||||
|
||||
/// Enable Cranelift's internal debug verifier (expensive)
|
||||
#[clap(long)]
|
||||
pub enable_cranelift_debug_verifier: bool,
|
||||
@@ -323,6 +328,9 @@ impl CommonOptions {
|
||||
if let Some(size) = self.dynamic_memory_guard_size {
|
||||
config.dynamic_memory_guard_size(size);
|
||||
}
|
||||
if let Some(size) = self.dynamic_memory_reserved_for_growth {
|
||||
config.dynamic_memory_reserved_for_growth(size);
|
||||
}
|
||||
|
||||
// If fuel has been configured, set the `consume fuel` flag on the config.
|
||||
if self.fuel.is_some() {
|
||||
|
||||
Reference in New Issue
Block a user