Thank you for your interest in contributing to B-FAST! We welcome contributions from the community and are excited to see what you'll bring to the project.
"Knowledge is the only wealth that grows when we share it"
B-FAST is built on the principle of open knowledge sharing. Every contribution, no matter how small, helps make high-performance serialization accessible to more developers.
- Rust 1.70+ (for core library)
- Python 3.8+ with uv or pip
- Node.js 14+ (for TypeScript client)
- Git for version control
-
Fork and clone the repository:
git clone https://github.com/your-username/b-fast.git cd b-fast -
Set up Python environment:
uv sync --extra dev # ou pip install bfast-py[dev] -
Install TypeScript dependencies:
cd client-ts npm install cd ..
-
Run tests to verify setup:
python -m pytest tests/ cd client-ts && npm run build
-
Create a feature branch:
git checkout -b feat/your-feature-name # or git checkout -b fix/bug-descriptionBranch naming conventions:
feat/*- New features or improvements (e.g.,feat/uuid-support)fix/*- Bug fixes (e.g.,fix/memory-leak)docs/*- Documentation only (e.g.,docs/api-examples)
Note: CI automatically runs on
feat/*andfix/*branches. Documentation-only changes (docs/*) don't trigger CI. -
Make your changes following our coding standards
-
Run the full test suite:
# Python tests python -m pytest tests/ -v # Code formatting python -m black . python -m ruff check . # TypeScript build cd client-ts && npm run build
-
Commit with descriptive messages:
git commit -m "feat: add support for UUID serialization - Implement UUID type (tag 0x80) in Rust encoder - Add UUID parsing in TypeScript decoder - Include tests for UUID round-trip serialization"
- Use the bug report template
- Include minimal reproduction case
- Specify Python/Node.js/Rust versions
- Include error messages and stack traces
- Use the feature request template
- Explain the use case and benefits
- Consider backward compatibility
- Discuss performance implications
- Core Rust library:
src/lib.rs,src/errors.rs - Python bindings:
python/b_fast/ - TypeScript client:
client-ts/ - Documentation:
docs/,README.md - Tests:
tests/
- API documentation improvements
- Usage examples and tutorials
- Performance optimization guides
- Translation to other languages
- Formatting: Black (line length 88)
- Linting: Ruff with project configuration
- Type hints: Required for public APIs
- Tests: pytest with descriptive names
- Formatting:
cargo fmt - Linting:
cargo clippy - Documentation: Rustdoc comments for public APIs
- Safety: Minimize unsafe code, document when necessary
- Formatting: Prettier (via npm scripts)
- Linting: ESLint configuration
- Types: Strict TypeScript, no
anyin public APIs - Compatibility: ES2020+ for modern environments
- Unit tests: Individual function/method testing
- Integration tests: Component interaction testing
- Performance tests: Benchmark critical paths
- Compatibility tests: Cross-platform validation
- All new features must include tests
- Bug fixes must include regression tests
- Performance changes need benchmark comparisons
- Breaking changes require migration guides
The benchmarks/bench_*.py files form the CodSpeed suite, which runs on every
push to main and on every pull request:
bench_codspeed.py- core encode/decode of Pydantic models, dicts and primitivesbench_streaming.py- length-prefixed frame encoding and stream decodingbench_types.py- NumPy payloads and extended types (datetime, UUID, Decimal, ...)
Run them locally with:
uv sync --group dev
uv run pytest benchmarks/bench_codspeed.py benchmarks/bench_streaming.py benchmarks/bench_types.py --codspeedNew benchmarks just need to use the benchmark fixture in a bench_*.py file.
-
Ensure your PR:
- Has a clear, descriptive title
- References related issues (
Fixes #123) - Includes tests for new functionality
- Updates documentation if needed
- Passes all CI checks
-
PR Review Process:
- Maintainers will review within 48 hours
- Address feedback promptly
- Keep discussions respectful and constructive
- Squash commits before merge if requested
-
Merge Requirements:
- All tests passing
- Code review approval
- No merge conflicts
- Documentation updated
feat- Feature branch (automatically added to PRs fromfeat/*branches)fix- Bug fix branch (automatically added to PRs fromfix/*branches)docs- Documentation branch (automatically added to PRs fromdocs/*branches)approved-N- Number of approvals (e.g.,approved-1,approved-2)
bug- Something isn't workingenhancement- New feature or improvementdocumentation- Documentation improvementsgood first issue- Good for newcomershelp wanted- Extra attention neededpython- Python-specific issuestypescript- TypeScript client issuesrust- Rust core library issuesperformance- Performance-related changes
- Use inclusive language
- Respect different perspectives and experiences
- Focus on constructive feedback
- Help newcomers feel welcome
- Share knowledge and resources
- Credit others' contributions
- Ask questions when unsure
- Offer help to other contributors
- Keep discussions on-topic
- Avoid personal attacks or harassment
- Respect maintainers' time and decisions
- Follow the code of conduct
- Questions: Open a discussion or issue
- Documentation: https://marcelomarkus.github.io/b-fast/
- Chat: GitHub Discussions for real-time help
- Examples: See
main.pyand client examples
By contributing to B-FAST, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to B-FAST! Together, we're making high-performance serialization accessible to everyone. 🚀