by panic · 8y ago · 0 comments
So assuming nothing changes and my understanding is correct, you'll just have to split your memory into two chunks; one that's safe to share and one that you keep private to your module.
And of course, unless you're writing WASM yourself by hand (which is possible, but I don't know how many people are doing it), your compiler should handle all of this for you -- so at the point where Rust or whatever says, "we want to allow you to split your code into multiple WASM modules instead of just bundling it all into one", it would have to come up with some kind of allocation strategy for this.
...
In the MVP, linear memory cannot be shared between threads of execution. The addition of threads :unicorn: will allow this.
To me that sounds like, "define multiple linear memories, then import them after you instantiate the module." But I could be misinterpreting.