Skip to content

Latest commit

 

History

History
54 lines (47 loc) · 1.99 KB

File metadata and controls

54 lines (47 loc) · 1.99 KB

Contributing Plugins

Thanks for contributing to the xfetch plugin ecosystem. This repository contains official plugins and the reference documentation for building new ones.

Workflow

  1. Fork the repository and create a feature branch.
  2. Create or update a plugin directory at the repository root.
  3. Run cargo test --workspace.
  4. Run the full CI locally before opening the PR: bash scripts/ci.sh (Linux/macOS) or ./scripts/ci.ps1 (Windows). The CI checks tests and the plugin standard.
  5. Document the plugin in its own README.md and in README.md.
  6. Update the platform compatibility table with the new plugin and its Linux/macOS/Windows support — required for every new or modified plugin.
  7. Open a pull request with usage details and any required external dependencies. PRs that fail CI are rejected.

Plugin Rules

  • Use the binary naming convention xfetch-plugin-<name>.
  • Keep plugins focused on a single responsibility.
  • Write errors to stderr and exit with a non-zero status on failure.
  • Prefer stable, actively maintained dependencies and keep them minimal.
  • Every plugin MUST have a runtime limit. Wrap all work in with_timeout (from xfetch_plugin_api) with a const BUDGET that fits the plugin (local probes: ~2 s, network calls: 15–25 s) and respond with fallback lines when the budget elapses. A plugin without a timeout is rejected: it could hang xfetch forever. This is enforced by CI.

Protocol Guide

The full protocol, discovery order, and testing workflow are documented in docs/README.md.