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

wasm export arguments #16

Open
konsumer opened this issue Sep 27, 2023 · 0 comments
Open

wasm export arguments #16

konsumer opened this issue Sep 27, 2023 · 0 comments

Comments

@konsumer
Copy link

konsumer commented Sep 27, 2023

How do I provide an argument to a function? I looked around in code, and didn't really see anything.

For example, I want to expose malloc from my wasm, it has 1 arg (size):

// How to insert an arg here?
web49_interp_data_t* data = web49_interp_block_run(interp, &interp->funcs[mallocID]);
uint32_t wptr = data->i32_u;

Related sidenote: is there a better way to allocate a buffer in wasm-memory?

@konsumer konsumer changed the title arguments wasm export arguments Sep 27, 2023
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

1 participant