Contributing
We welcome contributions to InkGen! This guide will help you get started.
Getting Started
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR-USERNAME/inkgen.git - Create a feature branch:
git checkout -b feature/my-feature - Follow the Development Setup
Development Setup
Prerequisites
- Rust stable toolchain (edition 2024)
justcommand runnercargo-instafor snapshot testing (optional)
Install Dependencies
git clone https://github.com/octofhir/inkgen.git
cd inkgen
just bootstrap
Build
cargo build --all
Test
just test
Or run tests for a specific crate:
cargo test -p inkgen-typescript
Lint and Format
just review
This runs formatting, clippy linting, and all tests.
Making Changes
Code Style
- Follow Rust conventions (use
rustfmt) - Use meaningful variable and function names
- Add documentation comments (
///) to public APIs - Keep functions focused and relatively short
- Add unit tests for new features
Commit Messages
Use conventional commits format:
feat: add new feature
fix: fix bug
docs: update documentation
test: add tests
chore: update dependencies
Pull Requests
- Ensure
just reviewpasses locally - Push your branch to your fork
- Create a PR against
main - Describe your changes clearly
- Fill out the PR template
- Ensure all CI checks pass
- Request review from maintainers
For detailed guidelines on adding language backends, see the main CONTRIBUTING.md in the repository root.
Reporting Issues
Use GitHub Issues to report bugs or suggest features:
- Check existing issues first
- Provide a minimal reproduction case
- Include environment details
- Attach relevant files
Code of Conduct
Please be respectful and constructive in all interactions.
Adding a New Language Backend
InkGen is designed to be extensible. To add a new language backend:
- Create a new crate in
crates/inkgen-<language> - Implement the
LanguageGeneratortrait frominkgen-core - Add configuration support
- Integrate with the CLI
- Write comprehensive tests
For detailed step-by-step instructions, see the CONTRIBUTING.md in the repository root.
Questions?
- Ask in GitHub Discussions
- Check the Documentation
- Review Architecture
- See the main CONTRIBUTING.md for detailed guidelines
Thank you for contributing!