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:
@@ -238,7 +238,7 @@ impl Config {
|
||||
self
|
||||
}
|
||||
|
||||
/// Configures whether the WebAssembly multi-value proposal will
|
||||
/// Configures whether the WebAssembly multi-value [proposal] will
|
||||
/// be enabled for compilation.
|
||||
///
|
||||
/// This feature gates functions and blocks returning multiple values in a
|
||||
@@ -252,6 +252,20 @@ impl Config {
|
||||
self
|
||||
}
|
||||
|
||||
/// Configures whether the WebAssembly multi-memory [proposal] will
|
||||
/// be enabled for compilation.
|
||||
///
|
||||
/// This feature gates modules having more than one linear memory
|
||||
/// declaration or import.
|
||||
///
|
||||
/// This is `false` by default.
|
||||
///
|
||||
/// [proposal]: https://github.com/webassembly/multi-memory
|
||||
pub fn wasm_multi_memory(&mut self, enable: bool) -> &mut Self {
|
||||
self.features.multi_memory = enable;
|
||||
self
|
||||
}
|
||||
|
||||
/// Configures which compilation strategy will be used for wasm modules.
|
||||
///
|
||||
/// This method can be used to configure which compiler is used for wasm
|
||||
|
||||
Reference in New Issue
Block a user