Skip to content

Return value from wasm module via WASI #32093

Closed
@jendrikw

Description

@jendrikw

Is your feature request related to a problem? Please describe.
I have a WebAssembly file compiled from a simple C++ program. I would like to get the return value from main. I am calling the function via wasm.start()

Describe the solution you'd like
start() should return the value from _start() and/or __wasi_unstable_reactor_start.

Describe alternatives you've considered
The WASI object could also store the return value and make it available via a getter function, but I think the solution via the return value cleaner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wasiIssues and PRs related to the WebAssembly System Interface.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions