Skip to content

wasm export arguments #16

Description

@konsumer

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions