Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support importing memory & table #1168

Open
YoungWenMing opened this issue May 12, 2022 · 10 comments
Open

Support importing memory & table #1168

YoungWenMing opened this issue May 12, 2022 · 10 comments

Comments

@YoungWenMing
Copy link
Contributor

Does this project have any plan to implement supports for importing memories and tables when instantiating a WebAssembly Instance?
Besides, any plan to implement the grow method of memories and tables?

@lum1n0us
Copy link
Collaborator

Currently, We prefer the below strategies for safety:

  • not to use host created memory and table
  • not to grow internal memory and table

@remko
Copy link

remko commented May 22, 2022

@lum1n0us Can you clarify your answer?

I also need to import the table and memory from a different module in an instantiation of a different module. Is there a way to achieve this? Will there ever be one?

Thanks!

@lum1n0us
Copy link
Collaborator

Unfortunately, there is no way to achieve that for now. Every module has to stick with its own table and memory for now in WAMR.

@Zzzode
Copy link

Zzzode commented Jun 6, 2022

  • not to grow internal memory and table

@lum1n0us
What safety concerns are involved with growing Memory and Table?

@lum1n0us
Copy link
Collaborator

WAMR actually doesn't want host functions linking "host-made" tables and memories. Worries of growing are related to WAMR memory model. WAMR will help .wasm modules to save their memory consumption and might have a few differences with the linear memory in users' minds.

@remko
Copy link

remko commented Jul 28, 2022

@lum1n0us In my case, my memory and table isn’t host-made. They’re simply imported from another module.

@lum1n0us
Copy link
Collaborator

That is the point. As a runtime, it can't tell an imported memory or table(in imports of wasm_instance_new()) comes from wasm_memory_new and wasm_table_new or from another module.

@yamt
Copy link
Collaborator

yamt commented Aug 10, 2022

Currently, We prefer the below strategies for safety:

* not to use host created memory and table

* not to grow internal memory and table

i'm not sure if i understand the "safety" argument.
it's just a lack of functionality.

@peter-jerry-ye
Copy link

May I ask if this is supported now? If not, how do we claim that WAMR is '- Full compliant to the W3C Wasm MVP' in README?

@lum1n0us
Copy link
Collaborator

#3807

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants