extism / extism

The framework for building with WebAssembly (wasm). Easily load wasm modules, move data, call functions, and build extensible apps.

Home Page:https://extism.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

runtime: update `Plugin::function_extists` and `extism_plugin_function_exists` to check the type of the functions too

zshipko opened this issue · comments

commented

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.

commented

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!

commented

Closed by #664