Plugin Trait Contracts
🏔️ Plugin Trait Contracts
Objective
Bastion's plugin model is compiled-in Rust crates, not dynamic loading. The
contract is therefore a set of Rust traits in a shared crate (bastion-plugin-api)
plus a host-API struct that plugins call to register themselves at startup.
This Milestone defines those traits and the workspace structure but does not
yet refactor any built-in pane — that's M5. After M4, writing a new plugin
should be a matter of:
- Add a new crate to the workspace
- Implement the relevant traits
- Call
register_*in the plugin's init function - Add the plugin to
bastion's init list
Success Criteria
bastion-plugin-apicrate exists in the workspace- Five core traits defined with documented contracts:
PanelPlugin— owns aRect, renders into it, handles events when focusedResourceViewer— registers for file extensions, renders selected resourcesCommandHandler— handler fn signature, context predicateFileAction— surface action on file entries (Op
No due date
0% Completed