Skip to content

Contributing

Thank you for your interest in contributing to rsylla!

Development Setup

Prerequisites

  1. Rust (latest stable)

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    

  2. Python 3.11+

  3. maturin

    pip install maturin
    

Clone and Build

git clone https://github.com/r4fek/rsylla.git
cd rsylla

# Create virtual environment
python -m venv .venv
source .venv/bin/activate

# Install in development mode
maturin develop

# With optimizations
maturin develop --release

Running Tests

# Start ScyllaDB
docker run --name scylla -d -p 9042:9042 scylladb/scylla

# Wait for startup
sleep 30

# Run tests
pytest tests/

Code Style

Rust

  • Follow standard Rust conventions
  • Use cargo fmt before committing
  • Run cargo clippy for lints
cargo fmt
cargo clippy

Python

  • Use type hints where possible
  • Follow PEP 8 guidelines

Making Changes

1. Create a Branch

git checkout -b feature/your-feature

2. Make Changes

  • Write tests for new functionality
  • Update documentation as needed
  • Ensure all tests pass

3. Commit

git add .
git commit -m "Description of changes"

4. Push and Create PR

git push origin feature/your-feature

Then create a Pull Request on GitHub.

Pull Request Guidelines

  • Keep PRs focused on a single change
  • Include tests for new features
  • Update documentation
  • Ensure CI passes

Reporting Issues

When reporting issues, please include:

  • rsylla version
  • Python version
  • ScyllaDB/Cassandra version
  • Minimal code to reproduce
  • Error messages and stack traces

Project Structure

rsylla/
 src/
    lib.rs          # Module exports
    session.rs      # Session and SessionBuilder
    query.rs        # Query and PreparedStatement
    batch.rs        # Batch operations
    result.rs       # QueryResult and Row
    types.rs        # Type conversions
    error.rs        # Error handling
 tests/              # Python tests
 examples/           # Example scripts
 benchmark/          # Benchmark scripts
 docs/               # Documentation

License

By contributing, you agree that your contributions will be licensed under MIT or Apache-2.0.

Questions?

  • Open an issue on GitHub
  • Check existing issues and discussions

Thank you for contributing!