test-framework
test-framework copied to clipboard
Add support for Proxy-Wasm ABI v0.2.0
This is needed to support extensions written using C++ SDK.
cc @agiachris
Aside from overlapping signatures of functions exported by the Proxy-Wasm module, there are also a series of host functions that need to be implemented in hostcalls.rs (even if left currently unimplemented for now) for the library to fully support v0.2.0. Leaving this for future reference.
While migrating from a custom implementation to the more standard WASI runtime in Envoy I came across this, so for reference to others, the hostcalls that you might get panics about are mostly going to be the ones listed here: https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/wasm/v3/wasm.proto#extensions-wasm-v3-capabilityrestrictionconfig
The test-framework will stumble over calls like clock_time_get, random_get and environ_get even if you are not directly using them (and using standard functions instead). If the imports are spotted, the framework won't be able to find them right now, as referred to by the two comments above (the not-yet-supported ABI v0.2.0 specifics).
I'm mostly leaving this comment here so others might find it instead of opening duplicated issues (as I was about to do).