Plugin registry for feature management.
Source: src/core/registry/mod.zig
Availability: Always enabled
pub const Registry| const | source |
Central registry managing feature lifecycle across all registration modes.
pub const Error| const | source |
Error type for Registry operations (alias for backward compatibility).
pub fn init(allocator: std.mem.Allocator) Registry| fn | source |
Initialize empty registry.
pub fn deinit(self: *Registry) void| fn | source |
Cleanup all registered features and plugin state.
pub fn registerComptime(self: *Registry, comptime feature: Feature) Error!void| fn | source |
Register a feature for comptime-only resolution. The feature must be enabled at compile time via build_options. This is zero-overhead - just validates feature exists at comptime.
pub fn registerRuntimeToggle( self: *Registry, comptime feature: Feature, comptime ContextType: type, config_ptr: *const anyopaque, ) Error!void| fn | source |
Register a feature with runtime toggle capability. Feature must be compiled in, but can be enabled/disabled at runtime.
pub fn registerDynamic( self: *Registry, feature: Feature, library_path: []const u8, ) Error!void| fn | source |
Register a feature for dynamic loading from a shared library (future).
pub fn initFeature(self: *Registry, feature: Feature) Error!void| fn | source |
Initialize a registered feature. For runtime_toggle and dynamic modes.
pub fn deinitFeature(self: *Registry, feature: Feature) Error!void| fn | source |
Shutdown a feature, releasing resources.
pub fn enableFeature(self: *Registry, feature: Feature) Error!void| fn | source |
Enable a runtime-toggleable feature.
pub fn disableFeature(self: *Registry, feature: Feature) Error!void| fn | source |
Disable a runtime-toggleable feature. Deinitializes if currently initialized.
pub fn isRegistered(self: *const Registry, feature: Feature) bool| fn | source |
Check if a feature is registered.
pub fn isEnabled(self: *const Registry, feature: Feature) bool| fn | source |
Check if a feature is currently enabled. For comptime_only: always true if registered For runtime_toggle/dynamic: depends on runtime state
pub fn isInitialized(self: *const Registry, feature: Feature) bool| fn | source |
Check if a feature is initialized and ready to use.
pub fn getMode(self: *const Registry, feature: Feature) ?RegistrationMode| fn | source |
Get the registration mode for a feature.
pub fn getContext( self: *const Registry, feature: Feature, comptime ContextType: type, ) Error!*ContextType| fn | source |
Get the context for a feature. Returns error if not initialized.
pub fn listFeatures(self: *const Registry, allocator: std.mem.Allocator) Error![]Feature| fn | source |
Get list of all registered features.
pub fn count(self: *const Registry) usize| fn | source |
Get count of registered features.
Generated automatically by zig build gendocs
Use the $zig Codex skill for ABI Zig 0.16-dev syntax updates, modular build graph guidance, and targeted validation workflows.