- Renamed udev rules file from 99-vpc.rules to 70-vpc.rules for better priority - Updated all references to the file in Makefile and documentation - Added instructions for manually creating udev rules when using precompiled binaries - Improved installation instructions for both Windows and Linux platforms
3.7 KiB
3.7 KiB
Contributing to OpenVPC Shift Tool
Thank you for your interest in contributing to the OpenVPC Shift Tool! This document provides guidelines and instructions for contributing to the project.
Code of Conduct
Please be respectful and considerate of others when contributing to this project. We aim to foster an inclusive and welcoming community.
Getting Started
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/vpc-shift-tool.git cd vpc-shift-tool - Add the original repository as an upstream remote:
git remote add upstream https://github.com/RavenX8/vpc-shift-tool.git - Create a new branch for your changes:
git checkout -b feature/your-feature-name
Development Environment Setup
-
Install the Rust toolchain from rustup.rs
-
Install dependencies:
- Windows: No additional dependencies required
- Linux:
sudo apt install libudev-dev pkg-config(Ubuntu/Debian)
-
Build the project:
cargo build -
Run the application:
cargo run
Making Changes
- Make your changes to the codebase
- Write or update tests as necessary
- Ensure all tests pass:
cargo test - Format your code:
cargo fmt - Run the linter:
cargo clippy
Commit Guidelines
- Use clear and descriptive commit messages
- Reference issue numbers in your commit messages when applicable
- Keep commits focused on a single change
- Use the present tense ("Add feature" not "Added feature")
Pull Request Process
- Update your fork with the latest changes from upstream:
git fetch upstream git rebase upstream/main - Push your changes to your fork:
git push origin feature/your-feature-name - Create a pull request through the GitHub interface
- Ensure your PR description clearly describes the changes and their purpose
- Link any related issues in the PR description
Code Style
- Follow the Rust style guidelines
- Use meaningful variable and function names
- Add comments for complex logic
- Document public functions and types
Project Structure
src/main.rs: Application entry point and main structuresrc/about.rs: About screen informationsrc/config.rs: Configuration handlingsrc/device.rs: Device representation and managementsrc/hid_worker.rs: HID communication worker threadsrc/state.rs: Application state managementsrc/ui.rs: User interface componentssrc/util.rs: Utility functions and constants
Adding Support for New Devices
If you're adding support for new device types:
- Update the device detection logic in
device.rs - Add any necessary report format definitions in
util.rs - Test with the actual hardware if possible
- Document the new device support in your PR
Testing
- Write unit tests for new functionality
- Test on both Windows and Linux if possible
- Test with actual VirPil hardware if available
Documentation
- Update the README.md with any new features or changes
- Document new functions and types with rustdoc comments
- Update TECHNICAL.md for significant architectural changes
Reporting Issues
If you find a bug or have a suggestion for improvement:
- Check if the issue already exists in the GitHub Issues
- If not, create a new issue with:
- A clear title and description
- Steps to reproduce the issue
- Expected and actual behavior
- System information (OS, Rust version, etc.)
- Screenshots if applicable
License
By contributing to this project, you agree that your contributions will be licensed under the project's GNU General Public License v3.0.