Hi! Could someone please clarify the plans for the multi-value return support in the component model (Canonical ABI)? How far are we? I'm interested in using them in WIT interfaces in rust.
Currently AFAIK there's no plans to implement it. The knobs are all there to take advantage of it and we have binary encodings in place to eventually take advantage of it in the future too. For now it's blocked on there's no way to write a source-level program (e.g. C or Rust) which uses multi-value returns in a stable fashion.
That being said it shouldn't prevent you from returning multiple values in WIT, whether or not wasm multi-value is used is "just" an ABI detail so all WIT features should work regardless (e.g. returning a tuple)
Thanks Alex!
Alex Crichton said:
That being said it shouldn't prevent you from returning multiple values in WIT, whether or not wasm multi-value is used is "just" an ABI detail so all WIT features should work regardless (e.g. returning a tuple)
Oh, my bad. I forgot to mention that we're using Wasm as a frontend in our compiler https://github.com/0xPolygonMiden/compiler so we're interested in seeing multi-value returns in generated Wasm.
Denys Zadorozhnyi has marked this topic as resolved.
Last updated: Nov 22 2024 at 17:03 UTC