-
Do not open up a GitHub issue if the bug is a security vulnerability in Cornucopia, and instead refer to our security policy.
-
Ensure the bug was not already reported by searching on GitHub under Issues.
-
If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a title and clear description, as much relevant information as possible, and a code sample or an executable test case demonstrating the expected behavior that is not occurring.
-
If possible, provide:
- Your PostgreSQL version
- Your Rust version (
rustc --version) - A minimal SQL query that reproduces the issue
- The generated Rust code (if applicable)
- The full error message with backtrace
-
Open a new GitHub pull request with the patch.
-
Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
-
Before submitting, please ensure:
- You have added tests for your fix
- All tests pass (
cargo test --all) - Code is formatted (
cargo fmt) - No clippy warnings (
cargo clippy)
Changes that are cosmetic in nature and do not add anything substantial to the stability, functionality, or testability of Cornucopia will generally not be accepted. Please focus on meaningful improvements.
-
First, check if the feature has already been discussed in Issues.
-
Open a new issue describing your proposed feature and start a discussion.
-
Do not start working on the feature until you have collected positive feedback about the change.
-
For significant changes, consider:
- How it affects existing users
- Performance implications
- Documentation needs
- Backwards compatibility
-
Check the README and existing documentation first.
-
For questions about using Cornucopia, please open a Discussion.
-
Documentation improvements are always welcome! This includes:
- Fixing typos or clarifying existing docs
- Adding examples
- Improving API documentation
- Writing tutorials or guides
-
For small changes, feel free to submit a PR directly.
-
For larger documentation efforts, please open an issue first to discuss the scope.
- Ensure you have Rust installed
- Clone the repository:
git clone https://github.com/cornucopia-rs/cornucopia.git - Run
cargo run --package test_integration -- --apply-codegento codegen the repo and all workspace packages - Run
cargo test --allto ensure all tests pass
- Follow Rust naming conventions and idioms
- Use
cargo fmtto format your code - Address all
cargo clippywarnings - Write tests for new functionality
- Keep commits focused and atomic
- Write clear, descriptive commit messages
Cornucopia is a volunteer effort. We encourage you to pitch in and help make PostgreSQL query generation in Rust even better!