Wasmtime and some other runtimes support multiple memories, but it seems that there are limited ways to utilize them.
In C some systems seem to support the use of address_space attribute to indicate in which memory buffers of memory exist in, however that is not supported by clang for wasm yet at least. Such would enable to indicate directly in C code how to operate with the memories.
Are there currently some higher-level languages or other ways to use multiple memories that someone knows?
The only approaches I have seen so far have been programming WAT or WASM directly.
Hmm. Actually, it seems that I cannot even find ways to generate a WASM file from a WAT as wat2wasm does not support multiple memories yet.
Is there some tool or way to generate Wasm modules that use the multi-memory instructions?
wasmtime supports running wat files directly, so that should work, I think. I appreciate that that isn't ideal, of course, and we should have better tooling. Maybe @Alex Crichton or @fitzgen (he/him) know of any?
That is good to know. For now just a way to create and execute such code / modules is enough. That allows experimenting with the feature.
Wasmtime should have runtime support for multi-module and the wasm-tools
repo should have support for the text/binary format as well. I don't personally know of any toolchains which support using or emitting multi-memory at this time. I'm not sure if LLVM has plans to add support for it in the future either.
Last updated: Nov 22 2024 at 16:03 UTC