Skip to content

Function arguments when returning a struct #2726

Closed
@willygroup

Description

@willygroup

Hi,
I'm pretty new to the whole rust/wasm world.
I'm passing to rust host from rust wasm function that returns a simple struct.
I'm compiling with cargo and the target wasm32-unknown-unknown.
I saw that when I check the module exports this function get an extra arguments... making some guessing I find out that is the memory pointer for the return struct...

I cannot find out some documentation for this behaviour... someone can please address me to the right direction?
Thanks a lot ☺

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