WebAssembly / component-model

Repository for design and specification of the Component Model
Other
971 stars 81 forks source link

Consider allowing caller-supplied buffer optimization for return values #175

Open lukewagner opened 1 year ago

lukewagner commented 1 year ago

Based on discussions in wasi-http/#8, we should consider a return-value optimization that avoids calling realloc by instead allowing the core wasm caller to supply a (buffer, length) i32 pair as a param. From my perspective, the main questions to consider are:

cpetig commented 3 months ago

A recent discussion of this happened in https://github.com/WebAssembly/component-model/issues/369