Files
releases/internal/wasm
Torin Sandall d2613b6a7a wasm: Improve calling convention of eval() function
This change updates the calling convention for the eval()
function. Instead of accepting input and data values and returning the
result set directly, the eval() function now accepts a pointer to the
opa_eval_ctx_t structure defined in the wasm library. The caller will
be responsible for setting the input and data addresses in the struct
before invoking eval() and reading the result address out of the
struct once eval() returns. The wasm library exposes getters and
setters for the caller.

This change will make it easier to extend the API in the future
without impacting the caller. For the time being the eval() function
always returns zero however in the future this could be changed.

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
2019-11-16 14:41:28 -05:00
..