component-model
component-model copied to clipboard
Multiple `cabi_start` functions in Canonical ABI
The component AST permits multiple start functions. Currently, the canonical ABI mangles them with the cabi version number and the signature, so if two start functions have the same signature, they'll mangle to the same thing. However, core wasm doesn't permit two exports to have the same name.
One option would be to add a sequence number to the mangling, like cabi_start{sequence=0,cabi=0.1}: func() or so. so that multiple start functions have distinct names, and canonicalABI consumers know what order to call them in.