MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / init_global

Function init_global

crates/opencode-plugin/src/lib.rs:288–293  ·  view source on GitHub ↗

Initialize the global plugin system. Call once at startup.

(system: Arc<PluginSystem>)

Source from the content-addressed store, hash-verified

286
287/// Initialize the global plugin system. Call once at startup.
288pub 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.
296pub fn global() -> Arc<PluginSystem> {

Callers 2

load_plugin_auth_storeFunction · 0.85
load_plugin_auth_storeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected