Files
releases/test
Torin Sandall bcf6bb8f49 wasm: Add support for built-in functions
This commit adds support for built-in functions. Previously there was
no way for the host environment to supply functions that could be
invoked from inside the wasm runtime.

This change updates the wasm library to declare callbacks that can be
invoked by the policy. The host environment should implement the
callbacks by using the first argument to dispatch to appropriate
built-in function implementation. The second callback argument is
reserved for future use. The remaining arguments represent the
operands passed to the call in the policy. This approach is used for
now because it avoids the need to update the function index when
compiling the policy executable which would require relinking the wasm
library object files (because if built-in imports were added
dynamically the function index would be shifted by some number and all
of the call instructions in the wasm library would have to be rewritten.)

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
2019-11-17 18:12:39 -05:00
..
2019-09-27 09:55:11 -04:00