Welcome Contributors
Contributions include code, documentation, answering user questions, running the project’s infrastructure, and advocating for all types of users. The project welcomes all contributions from anyone willing to work in good faith with other contributors and the community. No contribution is too small and all contributions are valued.Before You Start
External Contributions
Most development of Prisma Engines is done by employees of Prisma. We welcome external contributions, but need to balance that with the direction set in our company roadmap. This helps ensure:- Your work aligns with project direction
- You don’t duplicate existing efforts
- The implementation approach is acceptable
- Your time is well spent
Good First Contributions
The README identifies some areas that need documentation:- How to run
quainttests - How to run schema engine tests
Code of Conduct
The project has a Code of Conduct that all contributors are expected to follow. This code describes the minimum behavior expectations for all contributors. It is designed to help establish a culture where anyone and everyone who wants to contribute feels safe doing so.Key Principles
- Good faith collaboration - Trust that disagreements come from different perspectives, not bad intentions
- Respectful interaction - How you act reflects on both you and the project
- Open and inclusive - The community thrives on diversity and welcomes all contributors
- Self-regulation - Be quick to apologize and correct course, even if you’re not entirely convinced you need to
Bad Actors
A bad actor is someone who repeatedly violates the spirit of the Code of Conduct through consistent failure to self-regulate the way they interact with other contributors. Bad actors:- Alienate other contributors
- Discourage collaboration
- Reflect poorly on the project as a whole
- Being quick to apologize
- Correcting course even if unsure it’s necessary
- Giving other contributors the benefit of the doubt
- Having a sincere willingness to admit you might be wrong
Development Workflow
1. Set Up Your Environment
Install Dependencies
Follow the building guide to install:
- Rust toolchain
- direnv
- Docker (for database tests)
- Node.js and pnpm (for driver adapters)
2. Create a Branch
Use descriptive branch names:3. Make Your Changes
Code Changes
- Follow existing code style and conventions
- Add tests for new functionality
- Update relevant documentation
- Keep changes focused and atomic
Documentation Changes
- Use clear, concise language
- Include code examples where helpful
- Test that code examples actually work
- Update navigation if adding new pages
4. Test Your Changes
5. Update Snapshots (if needed)
If you changed diagnostics or output format:6. Format and Lint
7. Commit Your Changes
Write clear, descriptive commit messages:- Start with a type:
fix,feat,docs,test,refactor,perf,chore - Include component in parentheses:
(schema-engine),(query-compiler),(psl) - Provide context in the body
- Reference related issues
8. Push and Create PR
Pull Request Guidelines
PR Title
Follow the same format as commit messages:PR Description
Include:- What - What does this PR do?
- Why - Why is this change needed?
- How - How does it work? (for complex changes)
- Testing - How was it tested?
- Breaking Changes - Any breaking changes?
- Related Issues - Links to issues
Linking prisma/prisma Branch
If your changes require coordinated changes in bothprisma/prisma-engines and prisma/prisma:
- Create a branch in
prisma/prismawith your adapter/client changes - Add this tag to your PR description on a separate line:
- Merge the
prisma/prismaPR first - Then merge the
prisma/prisma-enginesPR
Integration Testing
Automated Integration Releases
Trigger automatic integration releases for testing in the full Prisma stack: Option 1: Branch namingintegration/ will:
- Run full test suite
- Build and release engines to S3/R2
- Trigger engines-wrapper update
- Create automated PR in prisma/prisma
- Publish to npm on
integrationtag - Run ecosystem tests
[integration] in any commit message triggers the same flow.
Option 3: Manual workflow
Run the build-engines workflow manually on your branch.
Testing from Forks
To trigger integration releases from a fork:Code Review Process
What to Expect
- Reviews may take time - be patient
- Reviewers may request changes
- Be responsive to feedback
- Discussions are about code, not you personally
Responding to Feedback
- Address all comments
- Ask questions if unclear
- Explain your reasoning when disagreeing
- Update code based on accepted feedback
- Mark conversations as resolved after addressing
Review Iterations
Coding Standards
Rust Style
- Follow standard Rust conventions
- Use
cargo fmtfor formatting - Address all
cargo clippywarnings - Write idiomatic Rust
- Prefer explicit over implicit
Testing Requirements
- Add tests for new features
- Maintain or improve test coverage
- Integration tests for user-facing changes
- Update snapshots when changing output
Documentation
- Document public APIs
- Add inline comments for complex logic
- Update README when adding features
- Include examples in documentation
Error Handling
- Use proper error types
- Provide helpful error messages
- Include context in errors
- Don’t panic in library code
Common Pitfalls
CRLF vs LF Line Endings
Some test fixtures require CRLF endings. Don’t change line endings unless intentional.Snapshot Updates
Missing Database URLs
Integration tests require database connections:Feature Flag Confusion
Some crates require specific features:Getting Help
Ask Questions
- GitHub Discussions - General questions
- GitHub Issues - Bug reports, feature requests
- Slack - Real-time chat (for contributors)
- PR Comments - Questions about your PR
Resources
Recognition
All contributors are valued and recognized:- Contributors listed in release notes
- Credit in commit history
- Community appreciation
- Building better tools for everyone
Security
If you discover a security issue: Do not open a public issue. Instead, email: [email protected]License
By contributing, you agree that your contributions will be licensed under the project’s license (Apache 2.0).Thank you for contributing to Prisma Engines! Your efforts help make database tools better for developers worldwide.