Modules

Rhai allows organizing code into modules.

A module holds a collection of functions, constants and sub-modules.

It may encapsulates a Rhai script together with the functions and constants defined by that script.

Other scripts can then load this module and use the functions and constants exported as if they were defined inside the same script.