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

Missing customSections function in wasm_c_api.h #3964

Open
AY268 opened this issue Dec 18, 2024 · 3 comments
Open

Missing customSections function in wasm_c_api.h #3964

AY268 opened this issue Dec 18, 2024 · 3 comments

Comments

@AY268
Copy link

AY268 commented Dec 18, 2024

I want to use the WebAssembly.Module.customSections function, but I couldn't find it in wasm_c_api.h.
I wonder, if I really want to use customSections in WAMR, how can I achieve this?
Also, does WAMR plan to include this function in future updates?

@lum1n0us
Copy link
Collaborator

Compared to this definition, there are similar APIs. wasm_runtime_get_custom_section() at https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/core/iwasm/include/wasm_export.h#L2013C1-L2015C66

The main difference between the two is that the JS APIs return a copy, while the C APIs return a reference.

@AY268
Copy link
Author

AY268 commented Dec 24, 2024

Compared to this definition, there are similar APIs. wasm_runtime_get_custom_section() at https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/core/iwasm/include/wasm_export.h#L2013C1-L2015C66

The main difference between the two is that the JS APIs return a copy, while the C APIs return a reference.

Thank you for your help, it really works!

@AY268
Copy link
Author

AY268 commented Dec 24, 2024

@lum1n0us
Hello, I have another question here. I tried to import memory/table to a wasm instance, but I found that WAMR does not copy the data in the memory/table. I wonder if you have any ideas about it. Really appreciate your help.

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

2 participants