Thank you for your interest in contributing to pea2pea!
To maintain the library's stability, performance, and simplicity, we adhere to a strict scope policy. Please read this document carefully before opening a Pull Request.
pea2pea is designed as a micro-kernel for P2P networking. It provides the absolute minimum required to build a network: connection pooling, stream handling, and framing.
It is not a framework. It does not enforce specific high-level protocols (like Gossipsub, Kademlia, etc.). Those belong in the application layer (user-land), not in this library.
We welcome contributions that harden the existing core without expanding the API surface area:
- Bug Fixes: Resolving panics, race conditions, or logic errors.
- Performance Improvements: Optimizations that reduce memory footprint or CPU usage.
- Documentation: Clarifications, typo fixes, or additional examples.
- Tests: New cases for any untested features, improvements to structure.
- Features impossible to implement by the user: Select enhancements that cannot be introduced outside the library.
To keep the library lightweight and maintainable, we generally reject:
- "Userland" Features: If it can be implemented on top of
pea2pea, it belongs in your application, not here. - Helper Functions: Quality-of-life abstractions often lead to bloat. We prefer explicit, low-level control.
- Specific Protocols: Implementations of specific RPC or Gossip algorithms.
- New Dependencies: We strive to keep the dependency tree minimal.
-
Open an Issue First: Unless it is a trivial typo fix, please open an issue to discuss your proposed change. This saves your time if the change falls outside our scope.
-
Run Tests: Ensure all tests pass locally.
cargo test -p tests -
Format Code: Ensure your code is formatted correctly, and that
clippyis happy.cargo fmt --all -- --check cargo clippy --workspace --all-targets -- -D warnings
Thank you for helping us keep pea2pea robust and reliable!