Skip to content

Latest commit

 

History

History
53 lines (46 loc) · 2.01 KB

File metadata and controls

53 lines (46 loc) · 2.01 KB

Contributing Extensions

Thanks for contributing to the xfetch extension ecosystem. This repository contains the official config-provider extensions.

Workflow

  1. Fork the repository and create a feature branch.
  2. Create or update an extension directory at extensions/<name>.
  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 extension standard.
  5. Document the extension in its own README.md and in the repository README.md.
  6. Update the platform compatibility table with the new extension and its Linux/macOS/Windows support — required for every new or modified extension.
  7. Open a pull request with usage details and any required external dependencies. PRs that fail CI are rejected.

Extension Rules

  • Use the binary naming convention xfetch-extension-<name>.
  • Keep extensions 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 extension MUST have a runtime limit. Wrap all work in with_timeout (from xfetch_extension_api) with a const BUDGET that fits the extension and exit with an error when the budget elapses. An extension without a timeout is rejected: it could hang the config load forever. This is enforced by CI.

Protocol Guide

The full stdin/stdout JSON protocol is defined in the xfetch-cli/api repository (crates/extension-api).