Thank you for your interest in contributing to bandwidthmon! This document provides guidelines and instructions for contributing.
- Be respectful and inclusive
- Welcome newcomers and encourage diverse perspectives
- Focus on constructive feedback
- Respect differing viewpoints and experiences
- Check existing issues - Search for similar issues first
- Create a detailed report including:
- Your operating system and version
- Rust version (
rustc --version) - Terminal emulator being used
- Steps to reproduce the issue
- Expected vs actual behavior
- Screenshots if applicable
- Check existing issues for similar suggestions
- Create an enhancement issue with:
- Clear description of the feature
- Use cases and benefits
- Possible implementation approach
- Any potential drawbacks
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes following the code style guidelines
- Test thoroughly on your platform
- Commit with clear messages (
git commit -m 'Add amazing feature') - Push to your fork (
git push origin feature/amazing-feature) - Open a Pull Request with:
- Clear description of changes
- Reference to related issues
- Screenshots/demos if UI changes
- Rust 1.70 or later
- Cargo (comes with Rust)
# Clone your fork
git clone https://github.com/cumulus13/bandwidthmon
cd bandwidthmon
# Build
cargo build
# Run tests (when available)
cargo test
# Run with cargo
cargo run --bin bandwidthmon -- -l
# Build release version
cargo build --releasebandwidthmon/
├── src/
│ ├── bandwidthmon.rs # Main binary using rasciichart
│ └── bandwidthmon2.rs # Alternative binary with manual rendering
├── Cargo.toml # Dependencies and metadata
├── README.md # Main documentation
├── EXAMPLES.md # Usage examples
├── CHANGELOG.md # Version history
└── CONTRIBUTING.md # This file
- Follow the Rust Style Guide
- Use
rustfmtfor consistent formatting:cargo fmt - Use
clippyfor linting:cargo clippy - Write idiomatic Rust code
- Add documentation comments for public APIs
# Format code
cargo fmt
# Check formatting without changing files
cargo fmt -- --check
# Run clippy
cargo clippy -- -D warnings- Document all public functions with
///comments - Include examples in documentation
- Keep comments up-to-date with code changes
- Use clear variable and function names
- Use
anyhow::Resultfor most functions - Use
thiserrorfor custom error types - Provide context with
.context()when propagating errors - Never use
unwrap()orexpect()in production code
While tests are not yet comprehensive, contributions should:
- Not break existing functionality
- Be tested manually on your platform
- Include test cases for new features (when test infrastructure is added)
<type>: <subject>
<body>
<footer>
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringperf: Performance improvementstest: Adding or updating testschore: Build process or auxiliary tool changes
feat: add export to CSV functionality
Add ability to export bandwidth statistics to CSV format
for later analysis. Includes new --export flag.
Closes #123
fix: handle interface disconnection gracefully
Previously crashed when interface was disconnected during monitoring.
Now shows error message and exits cleanly.
Fixes #456
We welcome contributions in these areas:
- Export data to CSV/JSON
- Network traffic filtering by port/protocol
- Alert thresholds for bandwidth limits
- Historical data persistence
- Multiple interface monitoring in single view
- Packet count statistics
- Connection tracking
- Interactive mode with keyboard navigation
- Configuration file support
- Custom color schemes
- Plugin system
- Remote monitoring support
Before submitting a PR, ensure:
- Code compiles without warnings (
cargo build) - Code is formatted (
cargo fmt) - Clippy passes (
cargo clippy) - Tested on your platform
- Documentation is updated
- CHANGELOG is updated
- Commit messages follow guidelines
If possible, test on:
- Linux (various distributions)
- macOS
- Windows
- BSD systems
Note the platforms you've tested on in your PR description.
- Open an issue for discussion
- Email the maintainer: cumulus13@gmail.com
- Check existing issues for similar questions
By contributing, you agree that your contributions will be licensed under the MIT License.
All contributors will be recognized in:
- Git history
- Release notes
- README (for significant contributions)
Thank you for contributing to bandwidthmon! 🎉