You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're trying to build an application where WASM is used to run "microfunctions", small stateless functions that can be written once (e.g. in Rust) and then ported via WASM to run in a variety of runtimes. A WASM Memory may be built once and then used again and again for multiple microfunction invocations. The buffers backing the WASM Memories would be owned and destroyed by the host environment.
The multi-memory proposal would be useful for our use case because it would enable a thread to carry around a Memory for its call stack (for Rust objects, not to be confused with WASM's operand stack) and plug it into any module, which has its own Memory for a heap and static variables. When only a single memory is used, it is much harder to reason about the thread safety of call stacks when multiple threads are calling the same module.
In other words, one Memory could be thread-local and mutable, and the other Memory could be cross-thread and read-only.
We're trying to build an application where WASM is used to run "microfunctions", small stateless functions that can be written once (e.g. in Rust) and then ported via WASM to run in a variety of runtimes. A WASM Memory may be built once and then used again and again for multiple microfunction invocations. The buffers backing the WASM Memories would be owned and destroyed by the host environment.
The multi-memory proposal would be useful for our use case because it would enable a thread to carry around a Memory for its call stack (for Rust objects, not to be confused with WASM's operand stack) and plug it into any module, which has its own Memory for a heap and static variables. When only a single memory is used, it is much harder to reason about the thread safety of call stacks when multiple threads are calling the same module.
In other words, one Memory could be thread-local and mutable, and the other Memory could be cross-thread and read-only.
CC @hagbard @nciric @echeran
Related: rustwasm/wee_alloc#88
The text was updated successfully, but these errors were encountered: