Provide cabi_realloc on wasm32-wasip2 by default
This commit provides a component model intrinsic in the standard library
by default on the wasm32-wasip2 target. This intrinsic is not
required by the component model itself but is quite common to use, for
example it's needed if a wasm module receives a string or a list.
The intention of this commit is to provide an overridable definition in the standard library through a weak definition of this function. That means that downstream crates can provide their own customized and more specific versions if they'd like, but the standard library's version should suffice for general-purpose use.
r? @m-ou-se
rustbot has assigned @m-ou-se. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r? to explicitly pick a reviewer
cc @sunfishcode and @rylev
I've tested this locally where the wit-bindgen test suite passes with the wasm32-wasip2 target from this PR
:umbrella: The latest upstream changes (presumably #122423) made this pull request unmergeable. Please resolve the merge conflicts.
Is this stuck? Might it need a "bors r+" to get it into the queue or is Bors meant to pick up review approvals now?
Ah while @rylev and @sunfishcode and I are all stakeholders on the wasm32-wasip2 target I'm not sure any of us have r+ permissions, so we'll need someone else to tell bors this is ready I think.
Looks like we might need @m-ou-se to reroll the review.
@bors r+
:pushpin: Commit 5af8187325210e3006874b1457fa6ec69293f0e9 has been approved by m-ou-se
It is now in the queue for this repository.