Contributing to GScript
Thank you for your interest in contributing to GScript! This guide will help you get started.
Ways to Contribute
There are many ways to contribute to GScript:
- Report Bugs: File issues for bugs you encounter
- Suggest Features: Propose new features via RFCs
- Write Documentation: Improve or expand documentation
- Submit Code: Fix bugs or implement features
- Share Examples: Contribute example programs
- Answer Questions: Help others in discussions
Getting Started
1. Set Up Development Environment
Clone the repository:
bash
git clone https://github.com/Parametrix-Labs/gscript-core.git
cd gscript-coreBuild the project:
bash
cargo buildRun tests:
bash
cargo test2. Find an Issue
Browse open issues labeled with:
good-first-issue: Beginner-friendly issueshelp-wanted: Issues seeking contributorsdocumentation: Documentation improvements
3. Create a Branch
Follow the branching convention:
bash
git checkout -b feature/GSC-XX-descriptionWhere GSC-XX is the issue number.
Development Workflow
1. Make Changes
- Write clear, focused commits
- Follow Rust coding conventions
- Add tests for new functionality
- Update documentation as needed
2. Test Your Changes
Run the test suite:
bash
cargo testTest specific operations:
bash
cargo test --test face_operationRun lints:
bash
cargo clippyFormat code:
bash
cargo fmt3. Submit a Pull Request
- Push your branch to GitHub
- Create a pull request with a clear description
- Link related issues
- Wait for code review
Code Guidelines
Rust Style
Follow standard Rust conventions:
- Use
snake_casefor functions and variables - Use
PascalCasefor types and traits - Use
SCREAMING_SNAKE_CASEfor constants - Keep functions focused and small
- Document public APIs with doc comments
Testing
Write tests for:
- New operations
- Edge cases
- Error conditions
- Backend-specific behavior
Example:
rust
#[test]
fn test_face_operation() {
let op = FaceOperation {
area: Rectangle::new(0.0, 0.0, 100.0, 100.0),
depth: 2.0,
stepover: 0.75,
};
assert!(op.validate().is_ok());
}Documentation
- Add doc comments to public APIs
- Include examples in doc comments
- Update user-facing documentation
- Keep the changelog updated
RFC Process
For significant changes, submit an RFC:
- Copy
docs/rfcs/0000-template.md - Fill in the RFC template
- Submit as a pull request
- Discuss with maintainers
- Implement after approval
See RFC Process for details.
Versioning
GScript follows Semantic Versioning:
- Major: Breaking changes
- Minor: New features (backward compatible)
- Patch: Bug fixes
See Versioning Policy for details.
Code Review
All contributions go through code review:
- Maintainers review pull requests
- Address feedback promptly
- Be open to suggestions
- Iterate until approval
Community Guidelines
- Be respectful and welcoming
- Focus on constructive feedback
- Help others learn
- Follow the Code of Conduct
Getting Help
- Questions: Use GitHub Discussions
- Chat: Join our community chat (coming soon)
- Email: Contact maintainers directly
Recognition
Contributors are recognized in:
- README.md contributors section
- Release notes
- Project documentation
Thank you for contributing to GScript!
Next Steps
- RFC Process - Submit feature proposals
- Versioning Policy - Understand releases
- Code Guidelines - Detailed coding standards