36 breaking releases

Uses new Rust 2021

0.37.0 Jul 5, 2022
0.35.0 Apr 4, 2022
0.34.0 Feb 22, 2022
0.32.0 Nov 16, 2021
0.6.0 Mar 29, 2019

#1534 in Network programming

Download history 13510/week @ 2022-04-27 15468/week @ 2022-05-04 15931/week @ 2022-05-11 15696/week @ 2022-05-18 13503/week @ 2022-05-25 13506/week @ 2022-06-01 16123/week @ 2022-06-08 16335/week @ 2022-06-15 14201/week @ 2022-06-22 11768/week @ 2022-06-29 13197/week @ 2022-07-06 15791/week @ 2022-07-13 16097/week @ 2022-07-20 14467/week @ 2022-07-27 15789/week @ 2022-08-03 14641/week @ 2022-08-10

63,987 downloads per month
Used in 6 crates (via libp2p)

MIT license

14K SLoC

Central repository for work on libp2p

dependency status

This repository is the central place for Rust development of the libp2p spec.

Getting started

Repository Structure

The main components of this repository are structured as follows:

  • core/: The implementation of libp2p-core with its Transport and StreamMuxer API on which almost all other crates depend.

  • transports/: Implementations of transport protocols (e.g. TCP) and protocol upgrades (e.g. for authenticated encryption, compression, ...) based on the libp2p-core Transport API .

  • muxers/: Implementations of the StreamMuxer interface of libp2p-core, e.g. (sub)stream multiplexing protocols on top of (typically TCP) connections. Multiplexing protocols are (mandatory) Transport upgrades.

  • swarm/: The implementation of libp2p-swarm building on libp2p-core with the central interfaces NetworkBehaviour and ConnectionHandler used to implement application protocols (see protocols/).

  • protocols/: Implementations of application protocols based on the libp2p-swarm APIs.

  • misc/: Utility libraries.

  • examples/: Worked examples of built-in application protocols (see protocols/) with common Transport configurations.

Community Guidelines

The libp2p project operates under the IPFS Code of Conduct.


  • Be respectful.
  • We're here to help: abuse@ipfs.io
  • Abusive behavior is never tolerated.
  • Violations of this code may result in swift and permanent expulsion from the IPFS [and libp2p] community.
  • "Too long, didn't read" is not a valid excuse for not knowing what is in this document.


(In alphabetical order.)

Notable users

(open a pull request if you want your project to be added here)


~324K SLoC