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")]
|
#[clap(long, value_name = "SIZE")]
|
||||||
pub dynamic_memory_guard_size: Option<u64>,
|
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)
|
/// Enable Cranelift's internal debug verifier (expensive)
|
||||||
#[clap(long)]
|
#[clap(long)]
|
||||||
pub enable_cranelift_debug_verifier: bool,
|
pub enable_cranelift_debug_verifier: bool,
|
||||||
@@ -323,6 +328,9 @@ impl CommonOptions {
|
|||||||
if let Some(size) = self.dynamic_memory_guard_size {
|
if let Some(size) = self.dynamic_memory_guard_size {
|
||||||
config.dynamic_memory_guard_size(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 fuel has been configured, set the `consume fuel` flag on the config.
|
||||||
if self.fuel.is_some() {
|
if self.fuel.is_some() {
|
||||||
|
|||||||
Reference in New Issue
Block a user