Contributing to warp

We welcome contributions from the community! Whether you're fixing a bug, adding a new feature, or improving documentation, your help is appreciated.

Getting Started

  1. Fork the repository on GitHub.
  2. Clone your fork locally: git clone https://github.com/your-username/warp.git
  3. Create a new branch for your changes: git checkout -b my-feature-branch

Code Style

Please format your code using the standard Rust formatter. You can check your code against the project's style by running:

cargo fmt --all --check

Running Tests

warp uses feature flags extensively, so it's important to run tests with different feature combinations to ensure nothing breaks.

The CI configuration provides a good reference for the required test commands.

Run standard tests:

cargo test --features test

Run tests for specific features:

# Test with multipart support
cargo test --features multipart,test

# Test with WebSocket support
cargo test --features websocket,test

# Test with compression support
cargo test --features compression,test

Make sure all tests pass before submitting your contribution.

Submitting a Pull Request

  1. Commit your changes with a clear and descriptive message.
  2. Push your branch to your fork on GitHub: git push origin my-feature-branch
  3. Open a Pull Request from your branch to the master branch of the seanmonstar/warp repository.
  4. In your PR description, explain the changes you've made and reference any related issues.

Issue Templates

When opening an issue, please use one of the available templates:

  • Bug report: For reporting unexpected behavior or crashes. Please include the warp version, platform, and a minimal reproducible example.
  • Feature request: For suggesting new ideas or enhancements.
  • For general questions, please use the Discord channel first.