wasm-micro-runtime icon indicating copy to clipboard operation
wasm-micro-runtime copied to clipboard

support pass buffer directly between two modules

Open scottlin2019 opened this issue 4 years ago • 3 comments

like this:

char *invokeModule(wasm_exec_env_t exec_env, uint32 *argv[], int argc)

scottlin2019 avatar Jul 01 '20 02:07 scottlin2019

@joshtriplett Is any spec proposal that might be related to this issue?

xwang98 avatar Jul 01 '20 03:07 xwang98

@abrown pointed this propsoal: https://github.com/WebAssembly/interface-types/blob/master/proposals/interface-types/Explainer.md#enabling-shared-nothing-linking-of-webassembly-modules

@scottlin2019

xwang98 avatar Jul 01 '20 03:07 xwang98

Passing a buffer between modules would definitely require some sort of memory-to-memory copying, at least at the moment, since modules wouldn't share a linear memory. That's part of what interface types should help to specify.

joshtriplett avatar Jul 01 '20 07:07 joshtriplett