rust-libp2p is the central Rust codebase for the libp2p specification. It provides transports, multiplexers, swarm APIs, and protocol crates for peer-to-peer apps.
Overview
rust-libp2p implements the modular libp2p networking stack in Rust. Core transport and muxer APIs, swarm networking behavior traits, and separate crates for application-level protocols are organized as distinct components.
Examples demonstrate common protocol combinations and transport setups. Transports cover TCP and upgrade paths; muxers implement stream multiplexing over connections.
The swarm crate exposes NetworkBehaviour and ConnectionHandler interfaces used to build custom libp2p applications. Maintainers list active contributors, and notable deployments include Polkadot.
Community guidance follows the IPFS Code of Conduct. Issues and discussions are handled on GitHub and broader libp2p forums.
Key features
- libp2p-core transports
- Stream muxer implementations
- Swarm NetworkBehaviour API
- Bundled protocol crates
- Worked protocol examples
- Peer-to-peer encryption upgrades
Use cases
- Building Rust P2P apps
- Polkadot-style networking
- Custom libp2p protocols
- Distributed crawler backbones