Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

CABI mismatch when no parameters or results #157

@lukewagner

Description

@lukewagner

In the general case, an async-lowered import has two core wasm params: one for the params, one for the results. But, at least as currently described in CanonicalABI.md as well as this section in the Async explainer, when there are no parameters, the first core wasm param is elided, and when there are no results, the second core wasm core wasm param is elided, such that there can be 0, 1 or 2 core wasm params. (Also, if there is only 1 flattened core parameter, that flattened core type, whatever it is, is used and the parameter is passed by value instead of by pointer.)

At the moment, based on my incomplete testing, it looks like wasip3-prototyping always takes 2 parameters, so it seems like we should reconcile the two, one way or another.

Also, fwiw, there is an open issue asking whether we could extend the abovementioned flattened-param optimization to >1 core params.

WDYT?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions