Skip to main content

Module module

Module module 

Source
Expand description

Module system for zshrs

Port from zsh/Src/module.c (3,646 lines)

In C, module.c provides dynamic loading of .so modules at runtime via dlopen/dlsym. In Rust, all modules are statically compiled into the binary — there’s no dynamic loading. This module provides the registration, lookup, and management API that the rest of the shell uses to interact with module features (builtins, conditions, parameters, hooks, and math functions).

Structs§

Module
A loaded module
ModuleFeature
A registered module feature
ModuleTable
Module table (from module.c module hash table)
Wrapper
Wrapper entry (from module.c addwrapper/deletewrapper)

Enums§

FeatureType
Module feature types
ModuleState
Module state

Traits§

ModuleLifecycle
Module lifecycle callbacks (from module.c setup_/boot_/cleanup_/finish_)

Functions§

freemodulenode
Free module node (from module.c freemodulenode)
newmoduletable
Create new module table (from module.c newmoduletable)
printmodulenode
Print module node (from module.c printmodulenode)
register_module
Register module (from module.c register_module)