2 releases

Uses new Rust 2024

0.2.2 Jan 16, 2026
0.2.1 Dec 17, 2025

#1195 in WebAssembly

MIT/Apache

130KB
3K SLoC

Language-agnostic plugin system for gravityfile.

This crate provides a trait-based plugin architecture that supports multiple scripting language runtimes (Lua, Rhai, and potentially WASM in the future).

Architecture

The plugin system is built around the PluginRuntime trait, which defines the interface that any scripting language runtime must implement. This allows users to write plugins in their preferred language.

Plugin Types

  • Analyzers: Custom file/directory analysis (async, returns data)
  • Previewers: File content preview generation (async, isolated)
  • Actions: Custom file operations (async with progress)
  • Renderers: Custom column/cell rendering (sync)
  • Filters: Search/filter plugins (sync/async)
  • Hooks: Event listeners (sync callbacks)

Example

use gravityfile_plugin::{PluginManager, PluginConfig};

let config = PluginConfig::default();
let mut manager = PluginManager::new(config)?;

// Load plugins from user config directory
manager.discover_plugins().await?;

// Dispatch a hook to all registered plugins
manager.dispatch_hook(&Hook::OnScanComplete { tree }).await?;

Dependencies

~17–34MB
~395K SLoC