Getting Started
The easiest way to get started is by asking for help in our Discord server.Ways to Contribute
Reporting Bugs
If you encounter a bug:- Search existing issues first to avoid duplicates
- Open a new issue if none exists
- Provide clear details:
- Steps to reproduce the bug
- Expected vs. actual behavior
- Server version and configuration
- Relevant logs or error messages
- Screenshots or recordings if applicable
Suggesting Features
Have an idea to improve Pumpkin?- Open an issue on the tracker
- Describe the feature in detail:
- What problem does it solve?
- How should it work?
- What are the benefits?
- Potential implementation considerations
For large contributions, consider discussing your approach first through an issue, discussion, or on Discord.
Submitting Pull Requests
Ready to contribute code?- Fork the repository on GitHub
- Install Rust from rust-lang.org
- Make your changes on your local fork
- Test thoroughly (see requirements below)
- Create a pull request to the main repository
Pull Request Requirements
Your CI checks will automatically verify most of these requirements.Basic Requirements
All PRs must meet these criteria:Clear Title and Description
Title: Use a concise, informative title that clearly communicates the purpose. Description: Provide a comprehensive explanation including:- What was changed?
- Why were these changes necessary?
- What is the impact of this change?
- Are there any known issues or limitations?
- Link to related issues or discussions
No Clippy Warnings
All Clippy warnings must be resolved:all- All standard Clippy lintsnursery- Experimental lintspedantic- Opinionated lintscargo- Cargo-specific lints
dbg_macro- Prevent debug macros in productionprint_stdout/print_stderr- Use proper logginguse_self- EnforceSelfusage- And many more (see
Cargo.toml)
Passing Unit Tests
All tests must pass:Best Practices
Writing Unit Tests
When adding features or modifying code:- Write tests to prevent future regressions
- Test edge cases and error conditions
- Follow Rust testing conventions
Benchmarking
For performance-sensitive changes:- Add benchmarks using Criterion
- Run before and after your changes
- Document performance impact in PR description
Clear Commit Messages
Write descriptive commit messages:- First line: Brief summary (50 chars or less)
- Blank line
- Detailed explanation: Why the change was made, context, etc.
Code Style
- Follow Rust conventions: Use
cargo fmtto format code - Meaningful names: Use clear, descriptive variable and function names
- Documentation: Add doc comments for public APIs
- Consistency: Match existing code style in the area you’re modifying
Documentation
If your changes introduce new functionality:- Update relevant documentation at pumpkinmc.org
- Add doc comments to public APIs:
- Update the changelog if applicable
Working with Tokio and Rayon
Pumpkin uses a hybrid concurrency model. When working with concurrent code:Critical Rules
For CPU-intensive tasks:-
Use Rayon’s thread pool:
rayon::spawn- Parallel iterators (
par_iter) - Other Rayon primitives
-
Transfer data asynchronously:
- Use
tokio::sync::mpscchannels - Never block waiting for Rayon results
- Use
Example: Correct Pattern
Seepumpkin_world::level::Level::fetch_chunks for a complete example:
What NOT to Do
Coding Standards
Edition and Version
Pumpkin uses:- Rust Edition: 2024
- Minimum Rust Version: 1.89
- Resolver: Version 3
Denied Lints
Some notable lints that will cause build failures:dbg_macro- Use proper logging insteadprint_stdout/print_stderr- Usetracingcrateredundant_clone- Optimize away unnecessary clonesneedless_pass_by_ref_mut- Don’t take&mutwhen not neededuse_self- UseSelfinstead of explicit type names
Allowed Lints
Some pedantic lints are allowed for practical reasons:cast_precision_loss- Floating point casts are commonmissing_panics_doc- Not all panics need documentationmissing_errors_doc- Not all errors need documentationmodule_name_repetitions- Sometimes necessary for clarity
Development Helpers
Typo Detection
Use typos to catch spelling errors:Pre-commit Checks
Before committing, run:Communication
- Comment on existing issues to share thoughts and feedback
- Ask questions in issues or on Discord
- Reach out to maintainers if you need assistance
- Be respectful and follow our Code of Conduct
Getting Help
- Discord: discord.gg/pumpkinmc
- Documentation: pumpkinmc.org
- Issue Tracker: GitHub Issues
Release Cycle
Pumpkin is currently in heavy development:- Active development toward 1.0.0 release
- See 1.0.0 milestone
- Breaking changes may occur before 1.0.0
Recognition
Contributors are recognized in:- GitHub contributors list
- Release notes (for significant contributions)
- Discord community highlights
Next Steps
- System Architecture - Understand the codebase
- Building from Source - Set up your environment
- Quick Start - Run Pumpkin locally
