mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
d2613b6a7a
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>