Thank you for your interest in contributing to Phichain! This guide will help you get started with contributing code, reporting bugs, and suggesting features.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ivan-1f/phichain/llms.txt
Use this file to discover all available pages before exploring further.
Getting Started
Set up development environment
Follow the Building guide to set up Rust and dependencies.
Development Workflow
Making Changes
Write code
Make your changes following the code style guidelines below.
Code Style
Phichain follows standard Rust conventions with some project-specific guidelines:Formatting
- Use
cargo fmtfor automatic formatting - 4 spaces for indentation (never tabs)
- Maximum line length: 100 characters (flexible)
Naming Conventions
Code Organization
- Keep functions focused and small
- Group related functionality into modules
- Use
mod.rsfor module public interfaces - Document public APIs with doc comments
Documentation
Document public APIs using doc comments:Bevy-Specific Guidelines
Certain Clippy lints are allowed in this project due to Bevy patterns.
type_complexity- Bevy queries can be complextoo_many_arguments- Bevy systems often have many parameters
Testing
Write tests for new functionality:Commit Guidelines
Commit Message Format
Use clear, descriptive commit messages:Commit Types
feat:New featurefix:Bug fixdocs:Documentation changesstyle:Code style changes (formatting, no logic change)refactor:Code refactoringperf:Performance improvementstest:Adding or updating testschore:Maintenance tasks, dependency updates
Examples
Commit Best Practices
- Make atomic commits (one logical change per commit)
- Write descriptive messages
- Reference issues when applicable:
fix: resolve timeline crash (#123) - Keep commits focused and small
Pull Request Process
Ensure quality
Before creating a PR, verify:
- Code is formatted (
cargo fmt --all) - Clippy passes (
cargo clippy --all-features --all-targets -- -D warnings) - All tests pass (
cargo test) - Manual testing completed
- Documentation updated if needed
Create pull request
Create a PR on GitHub with a clear description:Title: Clear, concise summaryDescription:
Respond to feedback
Maintainers will review your PR. Address any feedback:
- Make requested changes
- Push updates to your branch
- Respond to comments
- Be patient and respectful
PR Review Checklist
Reviewers will check:- Code quality and style
- Tests are adequate
- Documentation is updated
- No unnecessary dependencies added
- Performance impact considered
- Breaking changes documented
- Commit history is clean
Reporting Bugs
Before Reporting
Check existing issues
Search existing issues to avoid duplicates.
Bug Report Template
Include this information:Suggesting Features
Feature Request Template
Discussion First
For major features:- Open a discussion or issue first
- Get feedback from maintainers
- Discuss implementation approach
- Then start coding
License
Phichain is licensed under LGPL-3.0 (GNU Lesser General Public License v3.0).What This Means
For contributors
For contributors
By contributing, you agree that your contributions will be licensed under LGPL-3.0.
For users
For users
You can:
- Use Phichain for any purpose
- Study and modify the source code
- Distribute copies
- Distribute modified versions
- Include the license and copyright notice
- State changes made to the code
- Disclose source code when distributing
- Use the same license (LGPL-3.0)
Linking
Linking
LGPL allows linking with proprietary software, unlike GPL.The
phichain-chart library can be used in closed-source projects if dynamically linked.License Headers
No license headers are required in source files, but you may add them:Community
Getting Help
- QQ Group: 768476938
- Discord: discord.gg/ESUwcdMBPv
- GitHub Issues: For bugs and feature requests
- GitHub Discussions: For questions and ideas
Code of Conduct
Be respectful and constructive:- Welcome newcomers
- Provide constructive feedback
- Focus on ideas, not individuals
- Respect different perspectives
- Help maintain a positive environment
Development Tips
Faster iteration
Faster iteration
Use Bevy’s dynamic linking for faster compile times during development:
Hot reloading assets
Hot reloading assets
Bevy supports hot-reloading. Modify assets in
assets/ and see changes immediately.Logging
Logging
Use Bevy’s logging system:Set log level with environment variable:
Debugging
Debugging
Use Or use a proper debugger (VSCode with rust-analyzer, CLion, etc.)
dbg!() for quick debugging:Performance profiling
Performance profiling
Use Bevy’s built-in diagnostics:
Areas Needing Help
Looking to contribute but not sure where to start? These areas always need help:Documentation
- API documentation
- User guides
- Code examples
- Translations
Testing
- Unit tests
- Integration tests
- Bug reports
- Manual testing
Features
- Check “good first issue” label
- Implement planned features
- Improve UX
- Performance optimizations
Bug Fixes
- Fix reported bugs
- Improve error handling
- Edge case handling
- Platform-specific issues
Thank You!
Contributions of all kinds are appreciated:- Code contributions
- Bug reports
- Feature suggestions
- Documentation improvements
- Helping other users
- Spreading the word
View on GitHub
Check out the source code and start contributing