Thank you for your interest in contributing to RUSTScrapling! This document provides guidelines and information for contributors.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/RUSTScrapling.git cd RUSTScrapling - Build and run tests:
cargo build cargo test
- Create a feature branch from
master:git checkout -b feature/your-feature-name
- Make your changes, following the code style below
- Write tests for new functionality
- Run the full test suite:
cargo test cargo clippy -- -W clippy::all - Commit with a descriptive message:
git commit -m "feat: add support for XPath selectors" - Push and open a Pull Request
- Follow standard Rust conventions (
rustfmtdefaults) - Use
cargo fmtbefore committing - Address all
cargo clippywarnings - Public APIs must have doc comments
- Keep functions focused and small
- Prefer returning
Resultover panicking
Use Conventional Commits:
feat:-- new featurefix:-- bug fixdocs:-- documentation onlytest:-- adding or updating testsrefactor:-- code change that neither fixes a bug nor adds a featureperf:-- performance improvementchore:-- maintenance tasks
- Every new public method needs at least one test
- Place integration tests in
tests/ - Place unit tests inline with
#[cfg(test)]modules - Network-dependent tests must be marked
#[ignore] - Use
tempfilefor tests that need filesystem access
- Keep PRs focused on a single change
- Include a description of what changed and why
- Reference any related issues
- Ensure CI passes (tests + clippy)
- Be responsive to review feedback
When filing an issue, include:
- Rust version (
rustc --version) - Operating system
- Steps to reproduce
- Expected vs actual behavior
- Relevant error messages or logs
- Browser automation -- Headless Chrome / Playwright integration
- MCP server -- a ready-made Model Context Protocol wrapper around fetch/extract
- Performance benchmarks -- Comparing against Python Scrapling and other Rust parsers
- XPath support -- Full XPath query engine
- Documentation -- More examples and tutorials
By contributing, you agree that your contributions will be licensed under the same dual MIT/Apache-2.0 license as the project.