README.md

May 7, 2026 ยท View on GitHub

nim-libp2p logo

The Nim implementation of the libp2p Networking Stack.

Background

libp2p is a Peer-to-Peer networking stack, with implementations in multiple languages derived from the same specifications.

Building large scale peer-to-peer systems has been complex and difficult in the last 15 years and libp2p is a way to fix that. It strives to be a modular stack with secure defaults and useful protocols, while remaining open and extensible. This is a native Nim implementation, using chronos for asynchronous execution. It's used in production by a few projects.

Learn more about libp2p at libp2p.io and follow libp2p's documentation docs.libp2p.io.

Contribute

nim-libp2p is a great place to contribute. Your contribution will help drive thousands of decentralized nodes across networks worldwide.

The best part is that nim-libp2p has good first issues that are especially suited for newcomers. Your contributions will be guided by core maintainers, just like an internship experience but decentralized.

Jump into the contributing page to get started, nim-libp2p is expecting your contribution!

Install

The currently supported Nim versions are v2.2.4 and v2.2.10.

nimble install libp2p

You'll find the nim-libp2p documentation here. See examples for simple usage patterns.

Development

See the development guide to get started with the project and testing. For more details, refer to the documentation.

Contributors

Thanks to everyone who has contributed to nim-libp2p. Your support and efforts are greatly appreciated.

nim-libp2p contributors

Join the Conversation

Connect with other contributors in our community channel. Ask questions, share ideas, get support, and stay informed about the latest updates from the maintainers.

Users

nim-libp2p is used by:

  • Nimbus, an Ethereum client
  • logos-delivery, a decentralized messaging protocols
  • logos-storage, a decentralized storage protocols
  • (open a pull request if you want to be included here)

Stability

nim-libp2p has been used in production for many years in high-stake scenarios, so its core is considered stable. Some modules are more recent and less stable.

Versioning follows Semantic Versioning:

  • Releases within the same MAJOR version are backwards compatible.
  • MINOR releases may introduce new features and other non-breaking changes.
  • PATCH releases are reserved for backwards-compatible bug fixes.

License

Licensed under either of:

at your option.

Modules

List of packages modules implemented in nim-libp2p:

NameDescription
Libp2p
libp2pThe core Switch orchestrating transports, connections, and protocols
buildersSwitchBuilder fluent API for configuring and instantiating nodes
connmanagerConnection manager
identify / push identifyIdentify protocol
pingPing protocol
rendezvousRendezvous peer discovery protocol
Transports
tcpTCP transport
wsWebSocket & WebSocket Secure transport
quicQUIC transport
torTor transport
memoryIn-memory transport for testing
Secure Channels
noiseNoise secure channel
plaintextPlain text for development purposes
Stream Multiplexers
mplexMPlex multiplexer
yamuxYamux multiplexer
Data Types
peer-idCryptographic peer identifiers
peer-storeAddress book of known peers
multiaddressComposable network addresses
signed-envelopeSigned generic data container
routing-recordSigned peer dialing information
discovery managerDiscovery manager
Connectivity
autonatAutoNAT v1 - automatic NAT detection
autonat-v2AutoNAT v2 - improved NAT detection
relayCircuit Relay v2 for NAT traversal
dcutrDirect Connection Upgrade through Relay (hole punching)
hole-punching serviceHole punching service coordinating AutoNAT, Relay, and DCUTR
auto-relay serviceAutomatic relay node discovery and management
Utilities
cryptoCryptographic backend (RSA, Ed25519, Secp256k1, ECDSA)
crypto-secp256k1Secp256k1 elliptic curve
multistream-selectProtocol negotiation
autotlsAutomatic TLS certificate provisioning via ACME
nameresolvingDNS name resolver for multiaddresses
Pubsub
pubsubPub-Sub generic interface
floodsubFloodSub implementation
gossipsubGossipSub implementation
DHT
kademliaKademlia DHT for peer/value discovery
kademlia-discoveryKademlia-based peer discovery
Performance
perfPerf protocol for benchmarking libp2p nodes