Struct rant::DefaultModuleResolver
source · [−]pub struct DefaultModuleResolver {
pub enable_global_modules: bool,
pub local_modules_path: Option<String>,
}
Expand description
The default filesystem-based module resolver.
Resolution strategy
This resolver uses the following strategy to locate module files:
- If triggered by a program, the program’s containing directory is searched first.
- The directory specified in
local_modules_path
is searched next. If not specified, uses the host application’s current working directory. - If
enable_global_modules
is set totrue
, the global modules path is searched.
Fields
enable_global_modules: bool
Enables loading modules from RANT_MODULES_PATH.
local_modules_path: Option<String>
Specifies a preferred module loading path with higher precedence than the global module path. If not specified, looks in the current working directory.
Implementations
The name of the environment variable that used to provide the global modules path.