cc.require
A pure Lua implementation of the builtin require
function and
package
library.
Generally you do not need to use this module - it is injected into the every program's environment. However, it may be useful when building a custom shell or when running programs yourself.
Usage
Construct the package and require function, and insert them into a custom environment.
See also
Reusing code with require
For an introduction on how to userequire
.
Changes
- New in version 1.88.0
make(env, dir) | Build an implementation of Lua's package library, and a require function to load modules within it. |
---|