Skip to content

Multi value Wasm compilation #73755

Closed
Closed
@AchalaSB

Description

@AchalaSB

I wanted to use tuple in my code for wasm application. When i tried to compile my code to wasm using wasm32-unknown-unknown code is compiled but its not returning any return. But I see multi-value is recently supported by webassembly community.

How can I use multivalue ?
My sample example (Note: I'm not using external library like wasm-bindgen as i want to test with pure LLVM backend)

#[no_mangle]
pub extern fn test(x:u64, y:u64) -> (u64, u64) {
  (x + y, x - y)
}

My wasm code looks like
Screenshot from 2020-06-26 12-23-07

LLVM version: 9
Please suggest in this feature
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions