Refactor Built-ins to Plugin Architecture #7

Open
opened 2026-05-18 08:27:18 -04:00 by n8k99 · 0 comments
n8k99 commented 2026-05-18 08:27:18 -04:00
Owner

Description

Migrate Calendar and Clock widgets from built-in code to external WASM plugins.

Development Tasks (☿ Nova)

  • Create plugins/calendar/ with separate Cargo.toml
  • Port calendar logic to compile to wasm32-wasi target
  • Update core loader: reads calendar.wasm from ~/.config/bastion/plugins/
  • Same port process for clock widget
  • Remove built-in widget code from src/widgets/ (core shrinks)

Testing Criteria (☿ Nova)

  • Plugin load test: calendar.wasm -> running widget in pane
  • Plugin unload: widget gracefully removes from pane layout
  • Hot reload: file change in plugins/ triggers reload (dev mode)
  • Binary size test: core binary is smaller post-refactor
  • Distribution test: cargo xtask install-plugins sets up ~/.config

Completion Criteria (🜔 Claudian Review)

  • End-to-end: fresh install -> bastion -> plugins auto-build/setup
  • Performance: no frame time regression vs built-in implementation
  • Backward compatible: existing user configs work without migration
  • Documented: docs/MIGRATION.md for users and plugin developers

Blockers

  • #1 (Calendar Widget) - must exist to port
  • #2 (Clock Widget) - must exist to port
  • #6 (Plugin Trait Contracts) - interface must be stable

Assignees: @Nova
Labels: plugin, refactor, migration

## Description Migrate Calendar and Clock widgets from built-in code to external WASM plugins. ## Development Tasks (☿ Nova) - [ ] Create `plugins/calendar/` with separate `Cargo.toml` - [ ] Port calendar logic to compile to `wasm32-wasi` target - [ ] Update core loader: reads `calendar.wasm` from `~/.config/bastion/plugins/` - [ ] Same port process for clock widget - [ ] Remove built-in widget code from `src/widgets/` (core shrinks) ## Testing Criteria (☿ Nova) - [ ] Plugin load test: `calendar.wasm` -> running widget in pane - [ ] Plugin unload: widget gracefully removes from pane layout - [ ] Hot reload: file change in `plugins/` triggers reload (dev mode) - [ ] Binary size test: core binary is smaller post-refactor - [ ] Distribution test: `cargo xtask install-plugins` sets up ~/.config ## Completion Criteria (🜔 Claudian Review) - [ ] End-to-end: fresh install -> `bastion` -> plugins auto-build/setup - [ ] Performance: no frame time regression vs built-in implementation - [ ] Backward compatible: existing user configs work without migration - [ ] Documented: `docs/MIGRATION.md` for users and plugin developers ## Blockers - [ ] #1 (Calendar Widget) - must exist to port - [ ] #2 (Clock Widget) - must exist to port - [ ] #6 (Plugin Trait Contracts) - interface must be stable Assignees: @Nova Labels: plugin, refactor, migration
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
n8k99/bastion#7
No description provided.