[][src]Macro rhai_codegen::set_exported_fn

set_exported_fn!() { /* proc-macro */ }

Macro to register a plugin function into a Rhai Module.

Usage

This example is not tested
use rhai::plugin::*;

#[export_fn]
fn my_plugin_function(...) {
  ...
}

let mut module = Module::new();

set_exported_fn!(module, "calc", my_plugin_function);