Closed jkvargas closed 1 year ago
If I understand you correctly you want to call a rhai function from rust. If that is what you are trying to do here is the book page.
If you just want to call it, that book page is what you need. There will be an error if the user doesn't define such a function.
If you want to make sure that all required functions are properly defined, compile thr script to AST and the use one of the iter
functions to check for function names and number of parameters.
How can I request the user to write a function called prepare in Rhai so I can call it in rust? I want to ask the developer to write a bunch of functions on their side so I can later call these functions.
Can I get an example?