Skip to content

Commit

Permalink
*: Migrate to Rust 2021 edition (#2339)
Browse files Browse the repository at this point in the history
Co-authored-by: Max Inden <mail@max-inden.de>
  • Loading branch information
nuke-web3 and mxinden committed Nov 26, 2021
1 parent fd41751 commit a7ed1d6
Show file tree
Hide file tree
Showing 54 changed files with 171 additions and 37 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@
- `libp2p-yamux`
- `libp2p-mdns` (breaking compatibility with previous versions)

- Migrate to Rust edition 2021 (see [PR 2339]).

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

## Version 0.41.0 [2021-11-16]

- Update individual crates.
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "libp2p"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
description = "Peer-to-peer networking library"
version = "0.42.0"
authors = ["Parity Technologies <admin@parity.io>"]
Expand Down Expand Up @@ -87,7 +88,7 @@ libp2p-rendezvous = { version = "0.3.0", path = "protocols/rendezvous", optional
libp2p-request-response = { version = "0.15.0", path = "protocols/request-response", optional = true }
libp2p-swarm = { version = "0.33.0", path = "swarm" }
libp2p-swarm-derive = { version = "0.26.1", path = "swarm-derive" }
libp2p-uds = { version = "0.30.0", path = "transports/uds", optional = true }
libp2p-uds = { version = "0.31.0", path = "transports/uds", optional = true }
libp2p-wasm-ext = { version = "0.31.0", path = "transports/wasm-ext", default-features = false, optional = true }
libp2p-yamux = { version = "0.35.0", path = "muxers/yamux", optional = true }
multiaddr = { version = "0.13.0" }
Expand All @@ -111,7 +112,6 @@ 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",
Expand Down
5 changes: 5 additions & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# 0.31.0 [unreleased]

- Update dependencies.

- Report concrete connection IDs in `NetworkEvent::ConnectionEstablished` and
`NetworkEvent::ConnectionClosed` (see [PR 2350]).

- Migrate to Rust edition 2021 (see [PR 2339]).

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

# 0.30.1 [2021-11-16]
Expand Down
5 changes: 3 additions & 2 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "libp2p-core"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
description = "Core traits and structs of libp2p"
version = "0.31.0"
authors = ["Parity Technologies <admin@parity.io>"]
Expand All @@ -23,7 +24,7 @@ libsecp256k1 = { version = "0.7.0", optional = true }
log = "0.4"
multiaddr = { version = "0.13.0" }
multihash = { version = "0.14", default-features = false, features = ["std", "multihash-impl", "identity", "sha2"] }
multistream-select = { version = "0.10", path = "../misc/multistream-select" }
multistream-select = { version = "0.11", path = "../misc/multistream-select" }
parking_lot = "0.11.0"
pin-project = "1.0.0"
prost = "0.9"
Expand Down
4 changes: 4 additions & 0 deletions misc/metrics/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

- Update dependencies.

- Migrate to Rust edition 2021 (see [PR 2339]).

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

# 0.2.0 [2021-11-16]

- Include gossipsub metrics (see [PR 2316]).
Expand Down
3 changes: 2 additions & 1 deletion misc/metrics/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "libp2p-metrics"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
description = "Metrics for libp2p"
version = "0.3.0"
authors = ["Max Inden <mail@max-inden.de>"]
Expand Down
6 changes: 6 additions & 0 deletions misc/multistream-select/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.11.0 [unreleased]

- Migrate to Rust edition 2021 (see [PR 2339]).

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

# 0.10.4 [2021-11-01]

- Implement `From<io::Error> for ProtocolError` instead of `Into`.
Expand Down
5 changes: 3 additions & 2 deletions misc/multistream-select/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[package]
name = "multistream-select"
edition = "2021"
rust-version = "1.56.1"
description = "Multistream-select negotiation protocol for libp2p"
version = "0.10.4"
version = "0.11.0"
authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
keywords = ["peer-to-peer", "libp2p", "networking"]
categories = ["network-programming", "asynchronous"]
edition = "2018"

[dependencies]
bytes = "1"
Expand Down
3 changes: 2 additions & 1 deletion misc/peer-id-generator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "peer-id-generator"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
version = "0.1.0"
description = "Generate peer ids that are prefixed with a specific string"
authors = ["Parity Technologies <admin@parity.io>"]
Expand Down
4 changes: 4 additions & 0 deletions muxers/mplex/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

- Add `fn set_protocol_name(&mut self, protocol_name: &'static [u8])` to MplexConfig

- Migrate to Rust edition 2021 (see [PR 2339]).

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

# 0.30.0 [2021-11-01]

- Make default features of `libp2p-core` optional.
Expand Down
3 changes: 2 additions & 1 deletion muxers/mplex/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "libp2p-mplex"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
description = "Mplex multiplexing protocol for libp2p"
version = "0.31.0"
authors = ["Parity Technologies <admin@parity.io>"]
Expand Down
4 changes: 4 additions & 0 deletions muxers/yamux/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

- Update dependencies.

- Migrate to Rust edition 2021 (see [PR 2339]).

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

# 0.34.0 [2021-11-01]

- Make default features of `libp2p-core` optional.
Expand Down
3 changes: 2 additions & 1 deletion muxers/yamux/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "libp2p-yamux"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
description = "Yamux multiplexing protocol for libp2p"
version = "0.35.0"
authors = ["Parity Technologies <admin@parity.io>"]
Expand Down
4 changes: 4 additions & 0 deletions protocols/floodsub/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

- Update dependencies.

- Migrate to Rust edition 2021 (see [PR 2339]).

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

# 0.32.0 [2021-11-16]

- Update dependencies.
Expand Down
3 changes: 2 additions & 1 deletion protocols/floodsub/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "libp2p-floodsub"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
description = "Floodsub protocol for libp2p"
version = "0.33.0"
authors = ["Parity Technologies <admin@parity.io>"]
Expand Down
4 changes: 4 additions & 0 deletions protocols/gossipsub/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

- Update dependencies.

- Migrate to Rust edition 2021 (see [PR 2339]).

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

# 0.34.0 [2021-11-16]

- Add topic and mesh metrics (see [PR 2316]).
Expand Down
3 changes: 2 additions & 1 deletion protocols/gossipsub/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "libp2p-gossipsub"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
description = "Gossipsub protocol for libp2p"
version = "0.35.0"
authors = ["Age Manning <Age@AgeManning.com>"]
Expand Down
4 changes: 4 additions & 0 deletions protocols/identify/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

- Update dependencies.

- Migrate to Rust edition 2021 (see [PR 2339]).

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

# 0.32.0 [2021-11-16]

- Use `futures-timer` instead of `wasm-timer` (see [PR 2245]).
Expand Down
3 changes: 2 additions & 1 deletion protocols/identify/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "libp2p-identify"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
description = "Nodes identifcation protocol for libp2p"
version = "0.33.0"
authors = ["Parity Technologies <admin@parity.io>"]
Expand Down
4 changes: 4 additions & 0 deletions protocols/kad/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

- Update dependencies.

- Migrate to Rust edition 2021 (see [PR 2339]).

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

# 0.33.0 [2021-11-16]

- Use `instant` and `futures-timer` instead of `wasm-timer` (see [PR 2245]).
Expand Down
3 changes: 2 additions & 1 deletion protocols/kad/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "libp2p-kad"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
description = "Kademlia protocol for libp2p"
version = "0.34.0"
authors = ["Parity Technologies <admin@parity.io>"]
Expand Down
4 changes: 4 additions & 0 deletions protocols/mdns/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
valid peer ID. Thus they will be unable to discover nodes running this new
version of `libp2p-mdns`.

- Migrate to Rust edition 2021 (see [PR 2339]).

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

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

# 0.33.0 [2021-11-16]
Expand Down
3 changes: 2 additions & 1 deletion protocols/mdns/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "libp2p-mdns"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
version = "0.34.0"
description = "Implementation of the libp2p mDNS discovery method"
authors = ["Parity Technologies <admin@parity.io>"]
Expand Down
4 changes: 4 additions & 0 deletions protocols/ping/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

- Update dependencies.

- Migrate to Rust edition 2021 (see [PR 2339]).

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

# 0.32.0 [2021-11-16]

- Use `instant` and `futures-timer` instead of `wasm-timer` (see [PR 2245]).
Expand Down
3 changes: 2 additions & 1 deletion protocols/ping/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "libp2p-ping"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
description = "Ping protocol for libp2p"
version = "0.33.0"
authors = ["Parity Technologies <admin@parity.io>"]
Expand Down
4 changes: 4 additions & 0 deletions protocols/relay/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

- Update dependencies.

- Migrate to Rust edition 2021 (see [PR 2339]).

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

# 0.5.0 [2021-11-16]

- Use `instant` instead of `wasm-timer` (see [PR 2245]).
Expand Down
3 changes: 2 additions & 1 deletion protocols/relay/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "libp2p-relay"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
description = "Communications relaying for libp2p"
version = "0.6.0"
authors = ["Parity Technologies <admin@parity.io>"]
Expand Down
4 changes: 4 additions & 0 deletions protocols/rendezvous/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

- Update dependencies.

- Migrate to Rust edition 2021 (see [PR 2339]).

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

# 0.2.0 [2021-11-16]

- Use `instant` and `futures-timer` instead of `wasm-timer` (see [PR 2245]).
Expand Down
3 changes: 2 additions & 1 deletion protocols/rendezvous/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "libp2p-rendezvous"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
description = "Rendezvous protocol for libp2p"
version = "0.3.0"
authors = ["The COMIT guys <hello@comit.network>"]
Expand Down
4 changes: 4 additions & 0 deletions protocols/request-response/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

- Update dependencies.

- Migrate to Rust edition 2021 (see [PR 2339]).

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

# 0.14.0 [2021-11-16]

- Use `instant` instead of `wasm-timer` (see [PR 2245]).
Expand Down
3 changes: 2 additions & 1 deletion protocols/request-response/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "libp2p-request-response"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
description = "Generic Request/Response Protocols"
version = "0.15.0"
authors = ["Parity Technologies <admin@parity.io>"]
Expand Down
3 changes: 2 additions & 1 deletion src/tutorial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
//! name = "rust-libp2p-tutorial"
//! version = "0.1.0"
//! authors = ["Max Inden <mail@max-inden.de>"]
//! edition = "2018"
//! edition = "2021"
//! rust-version = "1.56.1"
//!
//! [dependencies]
//! libp2p = "<insert-current-version-here>"
Expand Down
3 changes: 3 additions & 0 deletions swarm-derive/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

- Remove unnecessary clone of error in `inject_dial_failure` (see [PR 2349]).

- Migrate to Rust edition 2021 (see [PR 2339]).

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

# 0.26.0 [2021-11-16]
Expand Down
3 changes: 2 additions & 1 deletion swarm-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "libp2p-swarm-derive"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
description = "Procedural macros of libp2p-core"
version = "0.26.1"
authors = ["Parity Technologies <admin@parity.io>"]
Expand Down
5 changes: 4 additions & 1 deletion swarm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# 0.33.0 [unreleased]

- Patch reporting on banned peers and their non-banned and banned connections (see [PR 2350]).
- Patch reporting on banned peers and their non-banned and banned connections (see [PR 2350]).

- Update dependencies.

- Migrate to Rust edition 2021 (see [PR 2339]).

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

# 0.32.0 [2021-11-16]
Expand Down
3 changes: 2 additions & 1 deletion swarm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "libp2p-swarm"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
description = "The libp2p swarm"
version = "0.33.0"
authors = ["Parity Technologies <admin@parity.io>"]
Expand Down
Loading

0 comments on commit a7ed1d6

Please sign in to comment.