Skip to content

Latest commit

 

History

History
86 lines (61 loc) · 2.55 KB

File metadata and controls

86 lines (61 loc) · 2.55 KB

Contributing to Rust Tensor Library

First off, thank you for considering contributing to Rust Tensor Library! It's people like you that make it a great tool.

Code of Conduct

This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.

How Can I Contribute?

Reporting Bugs

Before creating bug reports, please check the issue list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:

  • Use a clear and descriptive title
  • Describe the exact steps to reproduce the problem
  • Provide specific examples to demonstrate the steps
  • Describe the behavior you observed after following the steps
  • Explain which behavior you expected to see instead and why
  • Include details about your configuration and environment

Suggesting Enhancements

Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:

  • A clear and descriptive title
  • A detailed description of the proposed functionality
  • Explain why this enhancement would be useful
  • List any alternative solutions or features you've considered

Pull Requests

  1. Fork the repo and create your branch from main
  2. If you've added code that should be tested, add tests
  3. If you've changed APIs, update the documentation
  4. Ensure the test suite passes
  5. Make sure your code follows the existing style
  6. Issue that pull request!

Development Process

  1. Create a new branch:

    git checkout -b feature/your-feature-name
  2. Make your changes and commit them:

    git add .
    git commit -m "Add some feature"
  3. Run the tests:

    cargo test  # Run CPU tests
    cargo test --features cuda  # Run all tests including CUDA
  4. Format your code:

    cargo fmt
    cargo clippy --features cuda
  5. Push to your fork and submit a pull request

Style Guide

  • Follow Rust's official style guide
  • Use descriptive variable names
  • Comment complex algorithms
  • Update documentation for public APIs
  • Include tests for new functionality

Additional Notes

Git Commit Messages

  • Use the present tense ("Add feature" not "Added feature")
  • Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
  • Limit the first line to 72 characters or less
  • Reference issues and pull requests liberally after the first line

License

By contributing, you agree that your contributions will be licensed under the MIT License.