Initialize the global plugin system. Call once at startup.
(system: Arc<PluginSystem>)
| 286 | |
| 287 | /// Initialize the global plugin system. Call once at startup. |
| 288 | pub fn init_global(system: Arc<PluginSystem>) { |
| 289 | let existing = GLOBAL_PLUGIN_SYSTEM.get_or_init(|| Arc::clone(&system)); |
| 290 | if !Arc::ptr_eq(existing, &system) { |
| 291 | tracing::debug!("global plugin system already initialized; ignoring duplicate init"); |
| 292 | } |
| 293 | } |
| 294 | |
| 295 | /// Get the global plugin system, creating a default one if not initialized. |
| 296 | pub fn global() -> Arc<PluginSystem> { |
no outgoing calls
no test coverage detected