Skip to content

refactor(plugin): migrate host and SDK to ABI v2 - #203

Merged
Neamyoo-dev merged 11 commits into
masterfrom
refactor/plugin-abi-v2
Sep 27, 2026
Merged

Neamyoo-dev merged 11 commits into
masterfrom
refactor/plugin-abi-v2

Conversation

@Neamyoo-dev

@Neamyoo-dev Neamyoo-dev commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

Pre-submission checklist

  • I have read CONTRIBUTING.md and completed the required checks
  • Local and CI checks pass
  • I have completed a self-review
  • I confirm that I haven't read the checkboxes and just ticked them all

Change type (select one)

  • refactor Code change that neither fixes a bug nor adds a feature

Scope (select all that apply)

  • Application core
  • UI style or layout
  • Application behavior
  • Plugin API
  • Documentation

Related issues

None linked.


Description

Summary

Migrate WinIsland's plugin SDK, package loader, host, and widget rendering to ABI v2.

Motivation and context

ABI v1 exposed Skia drawing callbacks and global service tables to plugins. ABI v2 gives each plugin its own service tables and resource ownership, and has widgets submit validated drawing commands for host replay. ABI v1 plugins now receive an explicit upgrade error.

Changes

  • Add the ABI v2 SDK, C layout assertions, a minimal example, and self-contained public API guidance.
  • Add the package parser and host with per-plugin service tables, quotas, resource handles, lifecycle management, and crash attribution on restart.
  • Validate drawing streams before replay, including lengths, UTF-8, stack balance, images, and coordinates.
  • Connect widgets, lyrics, media sources, settings, text, images, storage, logs, and the marketplace to v2.
  • Remove the v1 host, static API tables, Skia plugin bridge, and legacy manager.
  • Keep signed marketplace catalog validation while skipping entries for incompatible ABI versions.
  • Retain the public SDK example and remove the temporary installation demo package after acceptance.

Migration and size

Metric Before After
v1 ABI symbol matches in plugin API / app plugin / UI 18 / 22 / 2 0 / 0 / 0
Skia references in app plugin source 8 0
Static plugin API tables 9 0
Legacy drawing bridge functions 7 0
Largest legacy plugin manager file 2,877 lines removed; largest new plugin crate source is 577 lines
WinIsland.exe release size 25,586,176 B 26,119,168 B (+2.08%)

No third-party dependency was added. Existing ABI v1 packages need an ABI v2 build; the loader reports this clearly. Existing user configuration remains readable.

UI changes

Widgets render through the validated host command stream in both the island and layout preview. A layout sizing fix keeps widget text stable during expansion. Invalid-frame notifications identify the plugin. The market page opens when its signed catalog contains older ABI entries.

Validation

  • cargo check, cargo clippy --workspace -- -D warnings, cargo fmt --all -- --check, and release build passed. The latest PR check and build-and-test jobs pass. The Page production build, the documented quickstart compile check, and packaging of winisland-plugin-package 0.8.0 also passed locally.
  • Manual Release runs verified ZIP installation without restart; enable, disable, uninstall; invalid manifest, missing DLL, and ABI v1 rejection; failed replacement rollback; widget text and tick in island and preview; settings persistence across restart; lyrics transformation with word highlighting; media priority and SMTC fallback; album art updates on track change; and crash recovery after plugin abort.
  • Three v2 plugins loaded together. In an instrumented local Release, six 60-second no-plugin windows averaged 61.752 rendered frames/s; three 60-second three-plugin windows averaged 62.518 frames/s, within baseline variation. Temporary instrumentation was removed and the original source and binary restored.
  • Host probes covered 30 malformed command streams, resource limits, cross-plugin handle rejection, thread join and DLL unload ordering, and shutdown failure retention.

Documentation and crate release

  • Rewrite the English and Chinese Page plugin development guides for ABI v2, including a compile-checked quickstart, service overview, lifecycle, and installation behavior.
  • Add the 0.8.0 plugin API changelog and align API/package crate versions and GPL-3.0-only license metadata.
  • Publish the newly independent winisland-plugin-package crate before winisland-plugin-api on master; the API packaging job waits for registry availability.

Deferred acceptance

The following two checks need external materials and are deferred for this merge:

  • A matching pre-migration v1 widget package or screenshot is needed for pixel comparison with v2.
  • The current signed marketplace catalog has no ABI v2 package; marketplace installation and revocation need a published v2 entry. The market page and local ZIP installation were verified.

One widget replay took 4.0275 ms when the settings window opened, above the 3 ms soft target. No sustained overrun was observed; the soft-limit observation remains recorded.

@Neamyoo-dev Neamyoo-dev changed the title Refactor/plugin abi v2 refactor(plugin): migrate host and SDK to ABI v2 Sep 27, 2026
@Neamyoo-dev
Neamyoo-dev merged commit af77e4d into master Sep 27, 2026
3 checks passed
@Neamyoo-dev
Neamyoo-dev deleted the refactor/plugin-abi-v2 branch September 27, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant