Due to cargo's feature unification, a full build of our workspace doesn't actually check whether the examples compile as standalone projects. We add a new CI check that iterates through all crates in the `examples/` directory and runs a plain `cargo check` on them. Any failure is bubbled up via `set -e`, thus failing CI in case one of the `cargo check` commands fails. To fix the current failures, we construct a simple TCP transport everywhere where we were previously using `development_transport`. That is because `development_transport` requires `mplex` which is now deprecated. Related #3657. Related #3809. Pull-Request: #3811.
Examples
A set of examples showcasing how to use rust-libp2p.
Getting started
Individual libp2p features
-
Chat A basic chat application demonstrating libp2p and the mDNS and Gossipsub protocols.
-
Distributed key-value store A basic key value store demonstrating libp2p and the mDNS and Kademlia protocol.
-
File sharing application Basic file sharing application with peers either providing or locating and getting files by name.
While obviously showcasing how to build a basic file sharing application with the Kademlia and Request-Response protocol, the actual goal of this example is to show how to integrate rust-libp2p into a larger application.
-
IPFS Kademlia Demonstrates how to perform Kademlia queries on the IPFS network.
-
IPFS Private Implementation using the gossipsub, ping and identify protocols to implement the ipfs private swarms feature.
-
Ping Small
ping
clone, sending a ping to a peer, expecting a pong as a response. See tutorial for a step-by-step guide building the example. -
Rendezvous Rendezvous Protocol. See specs.