Add initial support for the multi-memory proposal (#2263)
This commit adds initial (gated) support for the multi-memory wasm proposal. This was actually quite easy since almost all of wasmtime already expected multi-memory to be implemented one day. The only real substantive change is the `memory.copy` intrinsic changes, which now accounts for the source/destination memories possibly being different.
This commit is contained in:
@@ -124,6 +124,10 @@ struct CommonOptions {
|
||||
#[structopt(long)]
|
||||
enable_bulk_memory: Option<bool>,
|
||||
|
||||
/// Enable support for the multi-memory proposal
|
||||
#[structopt(long)]
|
||||
enable_multi_memory: bool,
|
||||
|
||||
/// Enable all experimental Wasm features
|
||||
#[structopt(long)]
|
||||
enable_all: bool,
|
||||
@@ -194,6 +198,7 @@ impl CommonOptions {
|
||||
)
|
||||
.wasm_multi_value(self.enable_multi_value.unwrap_or(true) || self.enable_all)
|
||||
.wasm_threads(self.enable_threads || self.enable_all)
|
||||
.wasm_multi_memory(self.enable_multi_memory || self.enable_all)
|
||||
.cranelift_opt_level(self.opt_level())
|
||||
.strategy(pick_compilation_strategy(self.cranelift, self.lightbeam)?)?
|
||||
.profiler(pick_profiling_strategy(self.jitdump, self.vtune)?)?
|
||||
|
||||
Reference in New Issue
Block a user