Skip to content

[Fix] Overhaul slipstream plugin setup/framework#3267

Draft
dgrkotsonis wants to merge 4 commits into
stagingfrom
rework_plugin_framework
Draft

[Fix] Overhaul slipstream plugin setup/framework#3267
dgrkotsonis wants to merge 4 commits into
stagingfrom
rework_plugin_framework

Conversation

@dgrkotsonis

@dgrkotsonis dgrkotsonis commented May 21, 2026

Copy link
Copy Markdown
Contributor

Slipstream plugin manager: static-only architecture with inventory self-registration

Motivation

The original implementation used #[no_mangle] C FFI to load plugins as .so/.dylib files at runtime via libloading. We've since reevaluated that need, as Rust's lack of a stable ABI makes dynamic loading of trait objects an inherent production risk, and the decoupling benefit it offered is still mostly preserved. Static linking with inventory self-registration is the cleaner and safer approach.

Changes Made

  • Added PluginRegistration { name, factory } + inventory::collect! to the plugin interface. Plugin crates self-register at link time via inventory::submit!, eliminating a need for hardcoded discovery logic in snarkOS
  • Removed all dynamic loading code from the plugin manager: LoadedPlugin, load_plugin(), from_config_files(),
    resolve_libpath_from_config(), load_plugin_from_config(), the Library::from(this()) shim, and the libloading/json5 dependencies
  • register() is now the only plugin path; Drop for LoadedSlipstreamPlugin calls on_unload() directly

@dgrkotsonis dgrkotsonis changed the title Overhaul slipstream plugin setup/framework [Feature] Overhaul slipstream plugin setup/framework May 21, 2026
@dgrkotsonis dgrkotsonis changed the title [Feature] Overhaul slipstream plugin setup/framework [Fix] Overhaul slipstream plugin setup/framework May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant