proxy-wasm / test-framework

WebAssembly for Proxies (test framework)
Apache License 2.0
16 stars 13 forks source link

Adaptive Wasm callbacks based on exports #9

Open agiachris opened 4 years ago

agiachris commented 4 years ago

Combination calls such as http_request(..) combine individual proxy-wasm callbacks in order: proxy_on_http_request_headers(..), proxy_on_http_request_body(..), proxy_on_http_request_trailers(..). In some cases, one of these functions may not exported across the ABI boundary. To prevent test failure, calling of these individual functions should not depend on the default simulator settings, but rather, on the visible functions exported by the wasm module.

We propose that upon initially mocking the wasm module, a check of exported wasm-side functions is done to prevent potential calls to such functions during high-level testing.