Skip to content

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-core

Build the project:

bash
cargo build

Run tests:

bash
cargo test

2. Find an Issue ​

Browse open issues labeled with:

  • good-first-issue: Beginner-friendly issues
  • help-wanted: Issues seeking contributors
  • documentation: Documentation improvements

3. Create a Branch ​

Follow the branching convention:

bash
git checkout -b feature/GSC-XX-description

Where 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 test

Test specific operations:

bash
cargo test --test face_operation

Run lints:

bash
cargo clippy

Format code:

bash
cargo fmt

3. 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_case for functions and variables
  • Use PascalCase for types and traits
  • Use SCREAMING_SNAKE_CASE for 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:

  1. Copy docs/rfcs/0000-template.md
  2. Fill in the RFC template
  3. Submit as a pull request
  4. Discuss with maintainers
  5. 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 ​

Released under the Apache License 2.0