Stream: general

Topic: SharedMemory across Modules


view this post on Zulip Varun Gupta (Nov 08 2022 at 21:56):

Can SharedMemory be used across multiple modules? Module A exports the memory and same memory is imported into Module B. Is there a sample code for that?

view this post on Zulip Alex Crichton (Nov 08 2022 at 22:14):

It can, yes. You can follow the example here to instantiate a module with shared memory, and extracting a shared memory is iterating over the imports of one instance. I'm not aware of self-contained examples for this

view this post on Zulip Varun Gupta (Nov 08 2022 at 23:07):

To create a shared memory, access to engine is required, right? Is there an example to create extern shared memory in Rust?

view this post on Zulip Alex Crichton (Nov 08 2022 at 23:19):

Sorry there's not a ton of examples for threads right now, you'll need to do most of the learning through exploration of the API documentation. It's not really in a state for ease-of-consumption right now due to the work-in-progress state of things.


Last updated: Dec 23 2024 at 12:05 UTC