Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a --dynamic-memory-reserved-for-growth CLI flag #5980

Merged
merged 1 commit into from
Mar 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions crates/cli-flags/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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() {
Expand Down