runtime: update `Plugin::function_extists` and `extism_plugin_function_exists` to check the type of the functions too
zshipko opened this issue · comments
Plugin::function_extists
and extism_plugin_function_exists
should check the signature of the functions to ensure they can be called by the Extism runtime.
A function is valid only if it takes no parameters and returns either an I32
or nothing.
First timer here. I'd like to pick this up.
Awesome!
This would require updating function_exists
to check the type of the params/results here instead of just checking is_some
. Only functions that have no parameters and return either an I32
or nothing should be considered valid.
Let me know if you have any questions!
Thanks @zshipko !