Crate libp2p

Source
Expand description

libp2p is a modular peer-to-peer networking framework.

To learn more about the general libp2p multi-language framework visit https://libp2p.io.

To get started with this libp2p implementation in Rust, please take a look at the tutorials. Further examples can be found in the examples directory.

Re-exports§

pub use bytes;
pub use futures;
pub use libp2p_quic as quic;quic and non-WebAssembly
pub use libp2p_identity as identity;

Modules§

allow_block_list
A libp2p module for managing allow and blocks lists to peers.
autonatautonat
bandwidth
connection_limits
core
Transports, upgrades, multiplexing and node handling of libp2p.
dcutrdcutr
Implementation of the libp2p Direct Connection Upgrade through Relay specification.
dnsdns
DNS name resolution
floodsubfloodsub
Implementation of the floodsub protocol.
gossipsubgossipsub
Implementation of the Gossipsub protocol.
identifyidentify
Implementation of the Identify protocol.
kadkad
Implementation of the libp2p-specific Kademlia protocol.
mdnsmdns
Implementation of the libp2p-specific mDNS protocol.
memory_connection_limitsmemory-connection-limits
metricsmetrics
Auxiliary crate recording protocol and Swarm events and exposing them as metrics in the OpenMetrics format.
multiaddr
Implementation of multiaddr in Rust.
multihash
Bare-minimum multihash data structure.
noisenoise
Noise protocol framework support for libp2p.
pingping
This module implements the /ipfs/ping/1.0.0 protocol.
plaintextplaintext
Implementation of the plaintext protocol.
pnetpnet
Implementation of the pnet protocol. Libp2p nodes configured with a pre-shared key can only communicate with other nodes with the same key.
relayrelay
Implementation of libp2p circuit relay protocol.
rendezvousrendezvous
Implementation of the Rendezvous protocol.
request_responserequest-response
Generic request/response protocols.
swarm
High-level network manager.
tcptcp
Implementation of the libp2p libp2p_core::Transport trait for TCP/IP.
tlstls
TLS configuration based on libp2p TLS specs.
tutorials
Rust-libp2p Tutorials to get started with.
udsuds
Implementation of the libp2p Transport trait for Unix domain sockets.
upnpupnp and non-WebAssembly
Implementation of UPnP port mapping for libp2p.
webrtc_websyswebrtc-websys
Rust libp2p-webrtc-websys
websocketwebsocket and non-WebAssembly
Implementation of the libp2p Transport trait for Websockets.
websocket_websyswebsocket-websys
Libp2p websocket transports built on web-sys.
webtransport_websyswebtransport-websys
Libp2p WebTransport built on web-sys
yamuxyamux
Implementation of the Yamux multiplexing protocol for libp2p.

Macros§

build_multiaddr
Easy way for a user to create a Multiaddr.

Structs§

BehaviourBuilderError
Multiaddr
Representation of a Multiaddr.
PeerId
Identifier of a peer of the network.
Stream
StreamProtocol
Identifies a protocol for a stream.
Swarm
Contains the state of the network, plus the way it should behave.
SwarmBuilder
Build a Swarm by combining an identity, a set of Transports and a NetworkBehaviour.
TransportBuilderError
WebsocketBuilderErrorNon-WebAssembly and websocket

Enums§

TransportError
An error during dialing or listening on a Transport.

Traits§

InboundUpgrade
Possible upgrade on an inbound connection or substream.
OutboundUpgrade
Possible upgrade on an outbound connection or substream.
Transport
A transport provides connection-oriented communication between two peers through ordered streams of data (i.e. connections).
TransportExt
Trait automatically implemented on all objects that implement Transport. Provides some additional utilities.