Contributing¶
Thank you for your interest in contributing to rewget!
Getting Started¶
Prerequisites¶
- Rust 1.75 or later
- Git
- wget (for testing)
Clone and Build¶
Run Tests¶
Run with Debug Output¶
Project Structure¶
rewget/
├── crates/
│ ├── rewget/ # CLI binary
│ ├── rewgetd/ # Daemon binary
│ └── rewget-core/ # Shared library
├── documentation/ # MkDocs documentation
├── Formula/ # Homebrew formula
└── scripts/ # Build scripts
How to Contribute¶
Reporting Bugs¶
- Check existing issues first
- Create a new issue with:
- rewget version (
rewget --rewget-version) - Operating system and version
- Steps to reproduce
- Debug output (
--rewget-debug) - Expected vs actual behavior
Suggesting Features¶
- Open a new issue
- Describe the feature and use case
- Explain why it would be useful
Submitting Code¶
- Fork the repository
- Create a feature branch:
- Make your changes
- Run tests:
- Commit with a clear message:
- Push and create a Pull Request
Code Style¶
Rust Style¶
- Follow the Rust Style Guide
- Use
cargo fmtbefore committing - Run
cargo clippyand address warnings - Add tests for new functionality
Commit Messages¶
Use clear, descriptive commit messages:
Add Stage 2 timeout configuration
- Add --rewget-timeout-stage2 flag
- Default to 15 seconds
- Update documentation
Documentation¶
- Update docs when adding features
- Include doc comments for public APIs
- Keep README.md in sync with changes
Development Workflow¶
Adding a New CLI Flag¶
-
Add to
crates/rewget/src/args.rs: -
Add to
crates/rewget-core/src/config.rs: -
Add to
crates/rewget/src/cli.rsfor completions: -
Update documentation
Adding a Detection Pattern¶
Edit crates/rewget-core/src/detection.rs:
Adding a Browser Profile¶
- Create profile JSON following the format in
profiles.md - Add to
crates/rewget-core/src/profile.rs:
Testing Against Real Sites¶
For development, you can test against sites known to have bot protection:
# Test impersonation
cargo run -- --rewget-debug https://nowsecure.nl/
# Test different profiles
cargo run -- --rewget-profile=firefox_136 --rewget-debug https://example.com/
Areas for Contribution¶
High Priority¶
- [ ] Browser profile capture automation
- [ ] Connection pooling in Stage 2
- [ ] Performance benchmarks
- [ ] Integration tests for fallback scenarios
Medium Priority¶
- [ ] Additional detection patterns
- [ ] Windows installer (winget/chocolatey)
- [ ] Configuration file support
- [ ] Proxy support improvements
Documentation¶
- [ ] More examples in user guide
- [ ] Video tutorials
- [ ] Translation to other languages
Testing¶
- [ ] Golden test suite for wget compatibility
- [ ] Fuzzing for argument parser
- [ ] Performance regression tests
Release Process¶
- Update version in
Cargo.toml - Update
CHANGELOG.md - Create git tag:
git tag v1.0.1 - Push:
git push origin v1.0.1 - GitHub Actions builds and publishes release
Code of Conduct¶
- Be respectful and inclusive
- Focus on constructive feedback
- Help newcomers feel welcome
- Report unacceptable behavior to maintainers
License¶
By contributing, you agree that your contributions will be licensed under the MIT License.
Getting Help¶
- Questions: Open a discussion
- Bugs: Open an issue
- Security: Email [email protected]
Thank you for contributing to rewget!