Add RPM and PyPI example plugins, restructure as workspace#7
Merged
Conversation
Convert the repo from a single plugin into a Cargo workspace with three example format handler plugins: - Unity (.unitypackage): gzip validation, path-based version extraction - RPM (.rpm): binary lead magic validation, right-to-left filename parsing - PyPI (.whl, .tar.gz): PEP 427 wheel parsing, PEP 503 name normalization, HTML + JSON index generation Each plugin demonstrates different aspects of WASM plugin development. 57 total tests across all three plugins. Updated CI to build/test all plugins, release workflow packages each plugin as a separate ZIP, and README documents the full workspace. Closes #6
Avoid conflicts with native format handlers that use the 'rpm' and 'pypi' keys. Custom plugin format keys use the '-custom' suffix so both can coexist in the same instance.
Implement the format-plugin-v2 WIT world in both example plugins so they can serve native client protocols directly from WASM: - PyPI plugin: serves PEP 503 simple API (package listing and per-package version pages) so pip install works against plugin-backed repos - RPM plugin: serves repodata XML (repomd.xml, primary.xml.gz) so dnf/yum can resolve and install packages from plugin-backed repos - Update WIT file with request-handler interface and format-plugin-v2 world - Add handle_request = true to both plugin manifests
Merged
5 tasks
Each example plugin is an independent crate that implements the same WIT interface. Cross-plugin code similarity is expected and intentional since each plugin is meant to be a self-contained, copy-pasteable template. Configuring SonarCloud modules so duplication is measured within each plugin rather than across the whole repo. This avoids false positives from the structural similarity between format handler implementations.
The sonar.modules approach does not isolate CPD (copy-paste detection) across modules. SonarCloud still compares files across all modules, flagging the WIT interface boilerplate (Metadata construction, validate pattern, handle_request scaffolding) as duplication. Replace the module-based config with sonar.cpd.exclusions to skip cross-plugin false positives entirely. Each plugin is an independent, copy-pasteable template where structural similarity is expected.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
plugins/Test results
57 total tests (12 Unity + 18 RPM + 27 PyPI), all passing. Clippy clean, fmt clean.
Test plan
cargo build --release --target wasm32-wasip2 --workspacebuilds all three pluginscargo clippy --target wasm32-wasip2 --workspace -- -D warningspassescargo test --workspacepasses (57 tests)cargo fmt --checkpassesCloses #6