Book updates for Plugins

This commit is contained in:
J Henry Waugh
2020-08-31 19:03:45 -05:00
parent 91b4f8a6bc
commit c5b2debf4a
3 changed files with 92 additions and 84 deletions

View File

@@ -3,9 +3,11 @@ Plugins
{{#include ../links.md}}
Rhai contains a robust _plugin_ system that greatly simplifies registration of custom functions.
Rhai contains a robust _plugin_ system that greatly simplifies registration of custom
functionality.
Instead of the large `Engine::register_XXX` API, and the parallel `Module::set_fn_XXX` API,
a _plugin_ simplifies the work of creating and registering multiple functions into an [`Engine`].
Instead of using the large `Engine::register_XXX` API or the parallel `Module::set_fn_XXX` API,
a _plugin_ simplifies the work of creating and registering new functionality in an [`Engine`].
Plugins are processed via a set of procedural macros under the `rhai::plugins` module.
Plugins are processed via a set of procedural macros under the `rhai::plugins` module. These
allow registering Rust functions directly in the Engine, or adding Rust modules as packages.