Skip to content

Commit

Permalink
Merge branch 'libp2p/master' into handler
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden committed Aug 18, 2021
2 parents d756be1 + f2905c0 commit 595623f
Show file tree
Hide file tree
Showing 59 changed files with 2,474 additions and 63 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

## Utilities

- [`libp2p-metrics` CHANGELOG](misc/metrics/CHANGELOG.md)
- [`multistream-select` CHANGELOG](misc/multistream-select/CHANGELOG.md)

# `libp2p` facade crate
Expand Down Expand Up @@ -66,7 +67,9 @@

- Re-export the `wasm-bindgen` feature from `parking_lot`, so
`libp2p` users can opt-in to that crate's Wasm support. See [PR 2180].


- Add `libp2p-metrics`.

[PR 2180]: https://github.com/libp2p/rust-libp2p/pull/2180/

## Version 0.39.1 [2021-07-12]
Expand Down
11 changes: 8 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ deflate = ["libp2p-deflate"]
dns-async-std = ["libp2p-dns", "libp2p-dns/async-std"]
dns-tokio = ["libp2p-dns", "libp2p-dns/tokio"]
floodsub = ["libp2p-floodsub"]
identify = ["libp2p-identify"]
kad = ["libp2p-kad"]
identify = ["libp2p-identify", "libp2p-metrics/identify"]
kad = ["libp2p-kad", "libp2p-metrics/kad"]
gossipsub = ["libp2p-gossipsub"]
metrics = ["libp2p-metrics"]
mdns = ["libp2p-mdns"]
mplex = ["libp2p-mplex"]
noise = ["libp2p-noise"]
ping = ["libp2p-ping"]
ping = ["libp2p-ping", "libp2p-metrics/ping"]
plaintext = ["libp2p-plaintext"]
pnet = ["libp2p-pnet"]
relay = ["libp2p-relay"]
Expand Down Expand Up @@ -70,6 +71,7 @@ libp2p-floodsub = { version = "0.31.0", path = "protocols/floodsub", optional =
libp2p-gossipsub = { version = "0.33.0", path = "./protocols/gossipsub", optional = true }
libp2p-identify = { version = "0.31.0", path = "protocols/identify", optional = true }
libp2p-kad = { version = "0.32.0", path = "protocols/kad", optional = true }
libp2p-metrics = { version = "0.1.0", path = "misc/metrics", optional = true }
libp2p-mplex = { version = "0.30.0", path = "muxers/mplex", optional = true }
libp2p-noise = { version = "0.33.0", path = "transports/noise", optional = true }
libp2p-ping = { version = "0.31.0", path = "protocols/ping", optional = true }
Expand Down Expand Up @@ -97,13 +99,16 @@ libp2p-websocket = { version = "0.31.0", path = "transports/websocket", optional

[dev-dependencies]
async-std = { version = "1.6.2", features = ["attributes"] }
async-trait = "0.1"
env_logger = "0.9.0"
structopt = "0.3.21"
tokio = { version = "1.0.1", features = ["io-util", "io-std", "macros", "rt", "rt-multi-thread"] }

[workspace]
resolver = "2"
members = [
"core",
"misc/metrics",
"misc/multistream-select",
"misc/peer-id-generator",
"muxers/mplex",
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ This repository is the central place for Rust development of the [libp2p](https:
- The **[examples](examples)** folder contains small binaries showcasing the
many protocols in this repository.

- To **report bugs, suggest improvements or request new features** please open
- For **security related issues** please reach out to security@ipfs.io. Please
do not file a public issue on GitHub.

- To **report bugs, suggest improvements or request new features** please open a
GitHub issue on this repository.

- For **rust-libp2p specific questions** please use the GitHub _Discussions_
Expand Down
51 changes: 51 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Examples

A set of examples showcasing how to use rust-libp2p.

## Getting started

- [Ping](ping.rs)

Small `ping` clone, sending a ping to a peer, expecting a pong as a response. See
[tutorial](../src/tutorial.rs) for a step-by-step guide building the example.

## Individual libp2p protocols

- [Chat](./chat.rs)

A basic chat application demonstrating libp2p and the mDNS and floodsub protocols.

- [Gossipsub chat](./gossipsub-chat.rs)

Same as the chat example but using the Gossipsub protocol.

- [Tokio based chat](./chat-tokio.rs)

Same as the chat example but using tokio for all asynchronous tasks and I/O.

- [Distributed key-value store](./distributed-key-value-store.rs)

A basic key value store demonstrating libp2p and the mDNS and Kademlia protocol.

- [IPFS Kademlia](ipfs-kad.rs)

Demonstrates how to perform Kademlia queries on the IPFS network.

- [IPFS Private](ipfs-private.rs)

Implementation using the gossipsub, ping and identify protocols to implement the ipfs private
swarms feature.

- [Passive Discovery via MDNS](mdns-passive-discovery.rs)

Discover peers on the same network via the MDNS protocol.

## Integration into a larger application

- [File sharing application](./file-sharing.rs)

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**.
Loading

0 comments on commit 595623f

Please sign in to comment.