31 releases (breaking)

Uses new Rust 2021

0.39.0 Jul 5, 2022
0.38.0 May 31, 2022
0.36.0 Feb 22, 2022
0.34.0 Nov 16, 2021
0.16.0 Feb 14, 2020

#228 in Network programming

Download history 18293/week @ 2022-04-22 18231/week @ 2022-04-29 20787/week @ 2022-05-06 21711/week @ 2022-05-13 20909/week @ 2022-05-20 19059/week @ 2022-05-27 18198/week @ 2022-06-03 22217/week @ 2022-06-10 23258/week @ 2022-06-17 18657/week @ 2022-06-24 19325/week @ 2022-07-01 18546/week @ 2022-07-08 23613/week @ 2022-07-15 23447/week @ 2022-07-22 22305/week @ 2022-07-29 23014/week @ 2022-08-05

96,317 downloads per month
Used in 15 crates (2 directly)

MIT license

25K 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)


~366K SLoC