Skip to content

Rust-based plugin system #14042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

zacoons
Copy link

@zacoons zacoons commented Jul 22, 2025

I know I'm late to the party, and that a lot of work has gone into the Steel plugin system, but I only learned about Helix recently, and I had an idea for a different way to implement the plugin system. I'm a big fan of minimal software, and the idea of embedding a Steel interpreter in Helix is not my cup of tea. Though, with the plugin system I'm proposing, it would be possible to write a plugin which loads Steel-based plugins, so that plugins which are written in Steel could depend on this Steel-loader plugin to load them.

Design

This is very much a work in progress, but it's much simpler, and possibly more versatile than the Steel plugin system. It was inspired by the Hyprland plugin system, and loads plugins as dynamic libraries. Plugins can be configured in TOML and can respond to config reloading. Plugins can have access to all Helix internals simply by adding the relevant projects as dependencies. Maybe there could be a helix-lib crate which re-exports everything for ease of use and compiles to a dynamic library so that plugins can share it.

In terms of plumbing with Helix, I think I will aim to use the PluginSystem interface as implemented in the Steel plugin system.

Sandboxing

There's been some talk about sandboxing plugins. I don't think it's necessary to sandbox plugins, but it wouldn't really be possible with this plugin system.

Distribution

Plugins are defined by their TOML file hx.toml. They can be binaries or source code. Among other things, the TOML file can specify build dependencies for the plugin to get built when Helix loads up. Otherwise it can point to a pre-built binary. Users can specify a list of plugin sources in their config, which could be Git repos, GitHub releases, or other arbitrary HTTP URLs. After fetching from a source, Helix would read it's hx.toml and do what's appropriate to load the plugin.

Plugin examples

Can be found at https://github.com/zacoons/helix-plugins

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