Stream: general

Topic: Multiple memories without WAT


view this post on Zulip Risto (Mar 04 2021 at 12:43):

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.

view this post on Zulip Risto (Mar 10 2021 at 08:01):

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?

view this post on Zulip Till Schneidereit (Mar 10 2021 at 11:12):

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?

view this post on Zulip Risto (Mar 10 2021 at 12:38):

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.

view this post on Zulip Alex Crichton (Mar 10 2021 at 15:10):

Wasmtime should have runtime support for multi-module and the wasm-toolsrepo 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: Oct 23 2024 at 20:03 UTC