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 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 self::simple::SimpleProtocol;

Modules

autonatautonat
Implementation of the AutoNAT protocol.
Transports, upgrades, multiplexing and node handling of libp2p.
deflatedeflate and neither Emscripten nor WASI nor target_os="unknown"
floodsubfloodsub
Implementation of the floodsub protocol.
gossipsubgossipsub and non-target_os="unknown"
Implementation of the Gossipsub protocol.
identifyidentify
Implementation of the Identify protocol.
A node’s network identity keys.
kadkad
Implementation of the libp2p-specific Kademlia protocol.
mdnsmdns
Implementation of the libp2p-specific mDNS protocol.
metricsmetrics
Auxiliary crate recording protocol and Swarm events and exposing them as metrics in the OpenMetrics format.
mplexmplex
Implementation of the Stream Multiplexer Mplex protocol.
Multihash implementation.
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.
quicquic and neither Emscripten nor WASI nor target_os="unknown"
Implementation of the QUIC transport protocol for libp2p.
relayrelay
Implementation of libp2p circuit relay protocol.
rendezvousrendezvous
Implementation of the Rendezvous protocol.
request_responserequest-response
Generic request/response protocols.
High-level network manager.
tcptcp
Implementation of the libp2p libp2p_core::Transport trait for TCP/IP.
tlstls
TLS configuration based on libp2p TLS specs.
Rust-libp2p Tutorials to get started with.
udsuds
wasm_extwasm-ext
Implementation of the libp2p Transport trait for external transports.
webrtcwebrtc
Implementation of the libp2p_core::Transport trait for WebRTC protocol without a signaling server.
websocketwebsocket and neither Emscripten nor WASI nor target_os="unknown"
Implementation of the libp2p Transport trait for Websockets.
yamuxyamux
Implementation of the Yamux multiplexing protocol for libp2p.

Macros

Easy way for a user to create a Multiaddr.

Structs

Representation of a Multiaddr.
Identifier of a peer of the network.
Contains the state of the network, plus the way it should behave.

Enums

An error during dialing or listening on a Transport.

Traits

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

Functions

development_transportNeither Emscripten nor WASI nor target_os="unknown" and (tcp-async-io and dns-async-std, or tcp and dns and async-std) and websocket and noise and mplex and yamux
Builds a Transport based on TCP/IP that supports the most commonly-used features of libp2p:
tokio_development_transportNeither Emscripten nor WASI nor target_os="unknown" and (tcp-tokio and dns-tokio, or tcp and dns and tokio) and websocket and noise and mplex and yamux
Builds a Transport based on TCP/IP that supports the most commonly-used features of libp2p: