Skip to main content

Contributing to rb-sys

All contributions to rb-sys are welcome, from documentation improvements to new features.

Code of Conduct

We are dedicated to providing a harassment-free community for everyone. Please read our full Code of Conduct before participating.

Ways to Contribute

  • Report Issues: Open an issue for bugs or feature requests.
  • Improve Documentation: Fix typos, add examples, or clarify confusing sections.
  • Contribute Code: Fix bugs or add new features.

Development Setup

  1. Fork and Clone:
    git clone https://github.com/YOUR_USERNAME/rb-sys.git
    cd rb-sys
    git remote add upstream https://github.com/oxidize-rb/rb-sys.git
  2. Create a Branch:
    git checkout -b my-new-feature
  3. Install & Build:
    bundle install
    cargo build
  4. Run Tests:
    bundle exec rake test
    cargo test

Pull Request Process

  1. Write code and tests. Ensure all tests pass and code is formatted (cargo fmt) and linted (cargo clippy).
  2. Update documentation for new features or behavior changes.
  3. Push your branch and open a Pull Request.
  4. Fill out the PR template. Describe changes and motivation.
  5. Respond to feedback. Be prepared to iterate on changes.

PR Checklist

  • Tests pass locally (cargo test and rake test).
  • Code is formatted (cargo fmt) and linted (cargo clippy).
  • Documentation has been updated.
  • Commit messages are clear and descriptive.
  • The branch is up-to-date with main.

Style Guidelines

  • Rust: Follow standard Rust API Guidelines and formatting (rustfmt). Document public APIs.
  • Ruby: Follow community standard style guide. Use 2 spaces for indentation.