mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-21 23:21:19 +00:00
.github/workflows: Refactor CI jobs (#3090)
We refactor our continuous integration workflow with the following goals in mind: - Run as few jobs as possible - Have the jobs finish as fast as possible - Have the jobs redo as little work as possible There are only so many jobs that GitHub Actions will run in parallel. Thus, it makes sense to not create massive matrices but instead group things together meaningfully. The new `test` job will: - Run once for each crate - Ensure that the crate compiles on its specified MSRV - Ensure that the tests pass - Ensure that there are no semver violations This is an improvement to before because we are running all of these in parallel which speeds up execution and highlights more errors at once. Previously, tests run later in the pipeline would not get run at all until you make sure the "first" one passes. We also previously did not verify the MSRV of each crate, making the setting in the `Cargo.toml` rather pointless. The new `cross` job supersedes the existing `wasm` job. This is an improvement because we now also compile the crate for windows and MacOS. Something that wasn't checked before. We assume that checking MSRV and the tests under Linux is good enough. Hence, this job only checks for compile-errors. The new `feature_matrix` ensures we compile correctly with certain feature combinations. `libp2p` exposes a fair few feature-flags. Some of the combinations are worth checking independently. For the moment, this concerns only the executor related transports together with the executor flags but this list can easily be extended. The new `clippy` job runs for `stable` and `beta` rust. Clippy gets continuously extended with new lints. Up until now, we would only learn about those as soon as a new version of Rust is released and CI would run the new lints. This leads to unrelated failures in CI. Running clippy on with `beta` Rust gives us a heads-up of 6 weeks before these lints land on stable. Fixes #2951.
This commit is contained in:
parent
05c079422e
commit
0c85839dab
331
.github/workflows/ci.yml
vendored
331
.github/workflows/ci.yml
vendored
@ -11,175 +11,235 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test-desktop:
|
||||
name: Build and test
|
||||
test:
|
||||
name: Test ${{ matrix.crate }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: gather_published_crates
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
args: [
|
||||
"--no-default-features",
|
||||
"--all-features",
|
||||
"--benches --all-features",
|
||||
]
|
||||
crate: ${{ fromJSON(needs.gather_published_crates.outputs.members) }}
|
||||
steps:
|
||||
- name: Install Protoc
|
||||
uses: arduino/setup-protoc@v1
|
||||
- name: Install Protoc
|
||||
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
|
||||
with:
|
||||
key: ${{ matrix.args }}
|
||||
- name: Get MSRV for ${{ matrix.crate }}
|
||||
id: parse-msrv
|
||||
run: |
|
||||
RUST_VERSION=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "${{ matrix.crate }}") | .rust_version')
|
||||
echo "version=${RUST_VERSION}" >> $GITHUB_OUTPUT
|
||||
|
||||
- run: cargo test --workspace ${{ matrix.args }}
|
||||
- name: Install Rust ${{ steps.parse-msrv.outputs.version }} for MSRV check
|
||||
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: ${{ steps.parse-msrv.outputs.version }}
|
||||
|
||||
test-wasm:
|
||||
name: Build on WASM
|
||||
runs-on: ubuntu-latest
|
||||
- name: Update to latest stable Rust
|
||||
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
# By default, this action already includes the active Rust toolchain in the cache key.
|
||||
# We also install a separate toolchain for the MSRV check so all we need to do is add that to the key to make sure it invalidates when we update the MSRV.
|
||||
# cargo separates build artifacts by Rust compiler version, meaning we can compile with different versions but cache all artifacts.
|
||||
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
|
||||
with:
|
||||
key: ${{ matrix.crate }}-msrv-${{ steps.parse-msrv.outputs.version }}
|
||||
|
||||
- name: Check if ${{ matrix.crate }} compiles on MSRV (Rust ${{ steps.parse-msrv.outputs.version }})
|
||||
run: cargo +${{ steps.parse-msrv.outputs.version }} check --package ${{ matrix.crate }} --all-features
|
||||
|
||||
- name: Check if we compile without any features activated
|
||||
run: cargo check --package ${{ matrix.crate }} --no-default-features
|
||||
|
||||
- name: Run all tests
|
||||
run: cargo test --package ${{ matrix.crate }} --all-features
|
||||
|
||||
- name: Check if crate has been released
|
||||
id: check-released
|
||||
run: |
|
||||
RESPONSE_CODE=$(curl https://crates.io/api/v1/crates/${{ matrix.crate }} --silent --write-out "%{http_code}" --output /dev/null)
|
||||
echo "code=${RESPONSE_CODE}"
|
||||
echo "code=${RESPONSE_CODE}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Check public API for semver violations
|
||||
if: steps.check-released.outputs.code == 200 # Workaround until https://github.com/obi1kenobi/cargo-semver-check/issues/146 is shipped.
|
||||
run: |
|
||||
cargo install cargo-semver-checks
|
||||
cargo semver-checks check-release -p ${{ matrix.crate }}
|
||||
|
||||
cross:
|
||||
name: Compile on ${{ matrix.target }}
|
||||
strategy:
|
||||
matrix:
|
||||
toolchain: [
|
||||
wasm32-unknown-emscripten,
|
||||
wasm32-wasi
|
||||
]
|
||||
include:
|
||||
- toolchain: wasm32-unknown-unknown
|
||||
args: "--features wasm-bindgen"
|
||||
env:
|
||||
CC: clang-11
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
- target: "wasm32-unknown-unknown"
|
||||
os: ubuntu-latest
|
||||
- target: "wasm32-unknown-emscripten"
|
||||
os: ubuntu-latest
|
||||
- target: "wasm32-wasi"
|
||||
os: ubuntu-latest
|
||||
- target: "x86_64-apple-darwin"
|
||||
os: macos-latest
|
||||
- target: "x86_64-pc-windows-msvc"
|
||||
os: windows-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Install Protoc
|
||||
uses: arduino/setup-protoc@v1
|
||||
- name: Install Protoc
|
||||
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Rust ${{ matrix.toolchain }}
|
||||
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
|
||||
with:
|
||||
toolchain: stable
|
||||
target: ${{ matrix.toolchain }}
|
||||
override: true
|
||||
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
target: ${{ matrix.target }}
|
||||
|
||||
- name: Install a recent version of clang
|
||||
run: |
|
||||
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
|
||||
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
|
||||
|
||||
- name: Install CMake
|
||||
run: sudo apt-get install -y cmake
|
||||
- run: cargo check --package libp2p --all-features --target=${{ matrix.target }}
|
||||
|
||||
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
|
||||
with:
|
||||
key: ${{ matrix.toolchain }}
|
||||
feature_matrix: # Test various feature combinations work correctly
|
||||
name: Compile with select features (${{ matrix.features }})
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- features: "mdns tcp dns tokio"
|
||||
- features: "mdns tcp dns async-std"
|
||||
steps:
|
||||
- name: Install Protoc
|
||||
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
|
||||
|
||||
- name: Build on ${{ matrix.toolchain }}
|
||||
# TODO: also run `cargo test`
|
||||
# TODO: ideally we would build `--workspace`, but not all crates compile for WASM
|
||||
run: cargo build --target=${{ matrix.toolchain }} ${{ matrix.args }}
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
|
||||
with:
|
||||
key: ${{ matrix.runtime }}
|
||||
|
||||
- run: cargo check --package libp2p --features="${{ matrix.features }}"
|
||||
|
||||
check-rustdoc-links:
|
||||
name: Check rustdoc intra-doc links
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install Protoc
|
||||
uses: arduino/setup-protoc@v1
|
||||
- name: Install Protoc
|
||||
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
|
||||
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
|
||||
|
||||
- name: Check rustdoc links
|
||||
run: RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links --deny warnings" cargo doc --verbose --workspace --no-deps --all-features --document-private-items
|
||||
- name: Check rustdoc links
|
||||
run: RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links --deny warnings" cargo doc --verbose --workspace --no-deps --all-features --document-private-items
|
||||
|
||||
check-clippy:
|
||||
clippy:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
rust-version: [
|
||||
stable,
|
||||
beta
|
||||
]
|
||||
steps:
|
||||
- name: Install Protoc
|
||||
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: ${{ matrix.rust-version }}
|
||||
override: true
|
||||
components: clippy
|
||||
|
||||
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
|
||||
|
||||
- name: Run cargo clippy
|
||||
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
|
||||
with:
|
||||
command: custom-clippy # cargo alias to allow reuse of config locally
|
||||
|
||||
ipfs-integration-test:
|
||||
name: IPFS Integration tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install Protoc
|
||||
uses: arduino/setup-protoc@v1
|
||||
- name: Install Protoc
|
||||
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
components: clippy
|
||||
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
|
||||
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
|
||||
|
||||
- name: Run cargo clippy
|
||||
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
|
||||
with:
|
||||
command: custom-clippy # cargo alias to allow reuse of config locally
|
||||
|
||||
integration-test:
|
||||
name: Integration tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install Protoc
|
||||
uses: arduino/setup-protoc@v1
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
|
||||
|
||||
- name: Run ipfs-kad example
|
||||
run: RUST_LOG=libp2p_swarm=debug,libp2p_kad=trace,libp2p_tcp=debug cargo run --example ipfs-kad --features full
|
||||
- name: Run ipfs-kad example
|
||||
run: RUST_LOG=libp2p_swarm=debug,libp2p_kad=trace,libp2p_tcp=debug cargo run --example ipfs-kad --features full
|
||||
|
||||
rustfmt:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
components: rustfmt
|
||||
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
components: rustfmt
|
||||
|
||||
- name: Check formatting
|
||||
run: cargo fmt -- --check
|
||||
- name: Check formatting
|
||||
run: cargo fmt -- --check
|
||||
|
||||
manifest_lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
- name: Ensure `full` feature contains all features
|
||||
run: |
|
||||
ALL_FEATURES=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "libp2p") | .features | keys | map(select(. != "full")) | sort | join(" ")')
|
||||
FULL_FEATURE=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "libp2p") | .features["full"] | sort | join(" ")')
|
||||
- name: Ensure `full` feature contains all features
|
||||
run: |
|
||||
ALL_FEATURES=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "libp2p") | .features | keys | map(select(. != "full")) | sort | join(" ")')
|
||||
FULL_FEATURE=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "libp2p") | .features["full"] | sort | join(" ")')
|
||||
|
||||
test "$ALL_FEATURES = $FULL_FEATURE"
|
||||
test "$ALL_FEATURES = $FULL_FEATURE"
|
||||
|
||||
echo "$ALL_FEATURES";
|
||||
echo "$FULL_FEATURE";
|
||||
echo "$ALL_FEATURES";
|
||||
echo "$FULL_FEATURE";
|
||||
|
||||
test "$ALL_FEATURES" = "$FULL_FEATURE"
|
||||
test "$ALL_FEATURES" = "$FULL_FEATURE"
|
||||
|
||||
gather_crates_for_semver_checks:
|
||||
gather_published_crates:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
members: ${{ steps.cargo-metadata.outputs.members }}
|
||||
@ -189,35 +249,4 @@ jobs:
|
||||
- id: cargo-metadata
|
||||
run: |
|
||||
WORKSPACE_MEMBERS=$(cargo metadata --format-version=1 --no-deps | jq -c '.packages | .[] | select(.publish == null) | .name' | jq -s '.' | jq -c '.')
|
||||
echo "::set-output name=members::${WORKSPACE_MEMBERS}"
|
||||
|
||||
semver-check:
|
||||
runs-on: ubuntu-latest
|
||||
needs: gather_crates_for_semver_checks
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
crate: ${{ fromJSON(needs.gather_crates_for_semver_checks.outputs.members) }}
|
||||
steps:
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7 # 0.10.0
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
- name: Install Protoc
|
||||
uses: arduino/setup-protoc@v1
|
||||
|
||||
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
|
||||
|
||||
- run: cargo install cargo-semver-checks
|
||||
|
||||
- name: Semver Check
|
||||
run: cargo semver-checks check-release -p ${{ matrix.crate }}
|
||||
echo "members=${WORKSPACE_MEMBERS}" >> $GITHUB_OUTPUT
|
||||
|
@ -71,6 +71,7 @@
|
||||
- Update to [`libp2p-noise` `v0.41.0`](transports/noise/CHANGELOG.md#0410).
|
||||
- Update to [`libp2p-ping` `v0.41.0`](protocols/ping/CHANGELOG.md#0410).
|
||||
- Update to [`libp2p-plaintext` `v0.38.0`](transports/plaintext/CHANGELOG.md#0380).
|
||||
- Update to [`libp2p-pnet` `v0.22.2`](transports/pnet/CHANGELOG.md#0222).
|
||||
- Update to [`libp2p-relay` `v0.14.0`](protocols/relay/CHANGELOG.md#0140).
|
||||
- Update to [`libp2p-rendezvous` `v0.11.0`](protocols/rendezovus/CHANGELOG.md#0110).
|
||||
- Update to [`libp2p-request-response` `v0.23.0`](protocols/request-response/CHANGELOG.md#0230).
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p"
|
||||
edition = "2021"
|
||||
rust-version = "1.60.0"
|
||||
rust-version = "1.62.0"
|
||||
description = "Peer-to-peer networking library"
|
||||
version = "0.50.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
@ -103,14 +103,13 @@ libp2p-mplex = { version = "0.38.0", path = "muxers/mplex", optional = true }
|
||||
libp2p-noise = { version = "0.41.0", path = "transports/noise", optional = true }
|
||||
libp2p-ping = { version = "0.41.0", path = "protocols/ping", optional = true }
|
||||
libp2p-plaintext = { version = "0.38.0", path = "transports/plaintext", optional = true }
|
||||
libp2p-pnet = { version = "0.22.1", path = "transports/pnet", optional = true }
|
||||
libp2p-pnet = { version = "0.22.2", path = "transports/pnet", optional = true }
|
||||
libp2p-relay = { version = "0.14.0", path = "protocols/relay", optional = true }
|
||||
libp2p-rendezvous = { version = "0.11.0", path = "protocols/rendezvous", optional = true }
|
||||
libp2p-request-response = { version = "0.23.0", path = "protocols/request-response", optional = true }
|
||||
libp2p-swarm = { version = "0.41.0", path = "swarm" }
|
||||
libp2p-uds = { version = "0.37.0", path = "transports/uds", optional = true }
|
||||
libp2p-wasm-ext = { version = "0.38.0", path = "transports/wasm-ext", optional = true }
|
||||
libp2p-webrtc = { version = "0.1.0-alpha", path = "transports/webrtc", optional = true }
|
||||
libp2p-yamux = { version = "0.42.0", path = "muxers/yamux", optional = true }
|
||||
multiaddr = { version = "0.16.0" }
|
||||
parking_lot = "0.12.0"
|
||||
@ -123,8 +122,9 @@ libp2p-dns = { version = "0.38.0", path = "transports/dns", optional = true }
|
||||
libp2p-mdns = { version = "0.42.0", path = "protocols/mdns", optional = true }
|
||||
libp2p-quic = { version = "0.7.0-alpha", path = "transports/quic", optional = true }
|
||||
libp2p-tcp = { version = "0.38.0", path = "transports/tcp", optional = true }
|
||||
libp2p-websocket = { version = "0.40.0", path = "transports/websocket", optional = true }
|
||||
libp2p-tls = { version = "0.1.0-alpha", path = "transports/tls", optional = true }
|
||||
libp2p-webrtc = { version = "0.1.0-alpha", path = "transports/webrtc", optional = true }
|
||||
libp2p-websocket = { version = "0.40.0", path = "transports/websocket", optional = true }
|
||||
|
||||
[target.'cfg(not(target_os = "unknown"))'.dependencies]
|
||||
libp2p-gossipsub = { version = "0.43.0", path = "protocols/gossipsub", optional = true }
|
||||
|
@ -6,9 +6,14 @@
|
||||
|
||||
- Move `Executor` to `libp2p-swarm`. See [PR 3097].
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.60.0. See [PR 3090].
|
||||
|
||||
- Update `multistream-select` to `v0.12.1`. See [PR 3090].
|
||||
|
||||
[PR 3031]: https://github.com/libp2p/rust-libp2p/pull/3031
|
||||
[PR 3058]: https://github.com/libp2p/rust-libp2p/pull/3058
|
||||
[PR 3097]: https://github.com/libp2p/rust-libp2p/pull/3097
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.37.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-core"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.60.0"
|
||||
description = "Core traits and structs of libp2p"
|
||||
version = "0.38.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
@ -23,7 +23,7 @@ libsecp256k1 = { version = "0.7.0", optional = true }
|
||||
log = "0.4"
|
||||
multiaddr = { version = "0.16.0" }
|
||||
multihash = { version = "0.16", default-features = false, features = ["std", "multihash-impl", "identity", "sha2"] }
|
||||
multistream-select = { version = "0.12", path = "../misc/multistream-select" }
|
||||
multistream-select = { version = "0.12.1", path = "../misc/multistream-select" }
|
||||
p256 = { version = "0.11.1", default-features = false, features = ["ecdsa"], optional = true }
|
||||
parking_lot = "0.12.0"
|
||||
pin-project = "1.0.0"
|
||||
|
@ -18,7 +18,10 @@
|
||||
|
||||
- Add `protocol_stack` metrics. See [PR 2982].
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.62.0. See [PR 3090].
|
||||
|
||||
[PR 2982]: https://github.com/libp2p/rust-libp2p/pull/2982/
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.10.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-metrics"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.62.0"
|
||||
description = "Metrics for libp2p"
|
||||
version = "0.11.0"
|
||||
authors = ["Max Inden <mail@max-inden.de>"]
|
||||
|
@ -1,3 +1,9 @@
|
||||
# 0.12.1 [Unreleased]
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.60.0. See [PR 3090].
|
||||
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.12.0
|
||||
|
||||
- Remove parallel dialing optimization, to avoid requiring the use of the `ls` command. See [PR 2934].
|
||||
|
@ -1,9 +1,9 @@
|
||||
[package]
|
||||
name = "multistream-select"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.60.0"
|
||||
description = "Multistream-select negotiation protocol for libp2p"
|
||||
version = "0.12.0"
|
||||
version = "0.12.1"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
license = "MIT"
|
||||
repository = "https://github.com/libp2p/rust-libp2p"
|
||||
|
@ -4,8 +4,11 @@
|
||||
- Implement `From` trait for `std::io::Error`. See [PR 2622].
|
||||
- Don't leak `prost` dependency in `Error` type. See [PR 3058].
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.60.0. See [PR 3090].
|
||||
|
||||
[PR 2622]: https://github.com/libp2p/rust-libp2p/pull/2622/
|
||||
[PR 3058]: https://github.com/libp2p/rust-libp2p/pull/3058/
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.2.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "prost-codec"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.60.0"
|
||||
description = "Asynchronous de-/encoding of Protobuf structs using asynchronous-codec, unsigned-varint and prost."
|
||||
version = "0.3.0"
|
||||
authors = ["Max Inden <mail@max-inden.de>"]
|
||||
|
@ -2,6 +2,7 @@
|
||||
name = "rw-stream-sink"
|
||||
edition = "2021"
|
||||
description = "Adaptator between Stream/Sink and AsyncRead/AsyncWrite"
|
||||
rust-version = "1.60.0"
|
||||
version = "0.3.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
license = "MIT"
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
- Update to `libp2p-core` `v0.38.0`.
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.60.0. See [PR 3090].
|
||||
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.37.0
|
||||
|
||||
- Bump rand to 0.8 and quickcheck to 1. See [PR 2857].
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-mplex"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.60.0"
|
||||
description = "Mplex multiplexing protocol for libp2p"
|
||||
version = "0.38.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
- Update to `libp2p-core` `v0.38.0`.
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.60.0. See [PR 3090].
|
||||
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.41.1
|
||||
|
||||
- Yield from `StreamMuxer::poll` as soon as we receive a single substream.
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-yamux"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.60.0"
|
||||
description = "Yamux multiplexing protocol for libp2p"
|
||||
version = "0.42.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
@ -9,7 +9,10 @@
|
||||
- Replace `Behaviour`'s `NetworkBehaviour` implemention `inject_*` methods with the new `on_*` methods.
|
||||
See [PR 3011].
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.62.0. See [PR 3090].
|
||||
|
||||
[PR 3011]: https://github.com/libp2p/rust-libp2p/pull/3011
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.8.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-autonat"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.62.0"
|
||||
description = "NAT and firewall detection for libp2p"
|
||||
version = "0.9.0"
|
||||
authors = ["David Craven <david@craven.ch>", "Elena Frank <elena.frank@protonmail.com>"]
|
||||
|
@ -150,7 +150,7 @@ impl<'a> HandleInnerEvent for AsClient<'a> {
|
||||
// Update observed address score if it is finite.
|
||||
let score = params
|
||||
.external_addresses()
|
||||
.find_map(|r| (r.addr == address).then(|| r.score))
|
||||
.find_map(|r| (r.addr == address).then_some(r.score))
|
||||
.unwrap_or(AddressScore::Finite(0));
|
||||
if let AddressScore::Finite(finite_score) = score {
|
||||
action = Some(NetworkBehaviourAction::ReportObservedAddr {
|
||||
@ -266,7 +266,7 @@ impl<'a> AsClient<'a> {
|
||||
// Filter servers for which no qualified address is known.
|
||||
// This is the case if the connection is relayed or the address is
|
||||
// not global (in case of Config::only_global_ips).
|
||||
addrs.values().any(|a| a.is_some()).then(|| id)
|
||||
addrs.values().any(|a| a.is_some()).then_some(id)
|
||||
}));
|
||||
}
|
||||
|
||||
|
@ -346,7 +346,7 @@ impl<'a> AsServer<'a> {
|
||||
addr.push(Protocol::P2p(peer.into()))
|
||||
}
|
||||
// Only collect distinct addresses.
|
||||
distinct.insert(addr.clone()).then(|| addr)
|
||||
distinct.insert(addr.clone()).then_some(addr)
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
@ -12,8 +12,11 @@
|
||||
- Replace `direct::Handler` and `relayed::Handler`'s `ConnectionHandler` implemention `inject_*`
|
||||
methods with the new `on_*` methods. See [PR 3085].
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.62.0. See [PR 3090].
|
||||
|
||||
[PR 3085]: https://github.com/libp2p/rust-libp2p/pull/3085
|
||||
[PR 3011]: https://github.com/libp2p/rust-libp2p/pull/3011
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.7.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-dcutr"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.62.0"
|
||||
description = "Direct connection upgrade through relay"
|
||||
version = "0.8.0"
|
||||
authors = ["Max Inden <mail@max-inden.de>"]
|
||||
|
@ -183,7 +183,7 @@ impl Behaviour {
|
||||
.expect("Peer of direct connection to be tracked.");
|
||||
connections
|
||||
.remove(&connection_id)
|
||||
.then(|| ())
|
||||
.then_some(())
|
||||
.expect("Direct connection to be tracked.");
|
||||
if connections.is_empty() {
|
||||
self.direct_connections.remove(&peer_id);
|
||||
|
@ -7,7 +7,10 @@
|
||||
- Replace `Floodsub`'s `NetworkBehaviour` implemention `inject_*` methods with the new `on_*` methods.
|
||||
See [PR 3011].
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.62.0. See [PR 3090].
|
||||
|
||||
[PR 3011]: https://github.com/libp2p/rust-libp2p/pull/3011
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.40.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-floodsub"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.62.0"
|
||||
description = "Floodsub protocol for libp2p"
|
||||
version = "0.41.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
@ -8,15 +8,18 @@
|
||||
|
||||
- Refactoring GossipsubCodec to use common protobuf Codec. See [PR 3070].
|
||||
|
||||
- Replace `Gossipsub`'s `NetworkBehaviour` implemention `inject_*` methods with the new `on_*` methods.
|
||||
- Replace `Gossipsub`'s `NetworkBehaviour` implementation `inject_*` methods with the new `on_*` methods.
|
||||
See [PR 3011].
|
||||
|
||||
- Replace `GossipsubHandler`'s `ConnectionHandler` implemention `inject_*` methods with the new `on_*` methods.
|
||||
- Replace `GossipsubHandler`'s `ConnectionHandler` implementation `inject_*` methods with the new `on_*` methods.
|
||||
See [PR 3085].
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.62.0. See [PR 3090].
|
||||
|
||||
[PR 3085]: https://github.com/libp2p/rust-libp2p/pull/3085
|
||||
[PR 3070]: https://github.com/libp2p/rust-libp2p/pull/3070
|
||||
[PR 3011]: https://github.com/libp2p/rust-libp2p/pull/3011
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.42.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-gossipsub"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.62.0"
|
||||
description = "Gossipsub protocol for libp2p"
|
||||
version = "0.43.0"
|
||||
authors = ["Age Manning <Age@AgeManning.com>"]
|
||||
|
@ -14,9 +14,12 @@
|
||||
- Replace `Handler`'s `ConnectionHandler` implemention `inject_*` methods with the new `on_*` methods.
|
||||
See [PR 3085].
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.62.0. See [PR 3090].
|
||||
|
||||
[PR 3085]: https://github.com/libp2p/rust-libp2p/pull/3085
|
||||
[PR 3011]: https://github.com/libp2p/rust-libp2p/pull/3011
|
||||
[PR 2995]: https://github.com/libp2p/rust-libp2p/pull/2995
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.40.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-identify"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.62.0"
|
||||
description = "Nodes identifcation protocol for libp2p"
|
||||
version = "0.41.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
@ -10,8 +10,11 @@
|
||||
- Replace `KademliaHandler`'s `ConnectionHandler` implemention `inject_*` methods with the new `on_*` methods.
|
||||
See [PR 3085].
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.62.0. See [PR 3090].
|
||||
|
||||
[PR 3085]: https://github.com/libp2p/rust-libp2p/pull/3085
|
||||
[PR 3011]: https://github.com/libp2p/rust-libp2p/pull/3011
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.41.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-kad"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.62.0"
|
||||
description = "Kademlia protocol for libp2p"
|
||||
version = "0.42.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
@ -17,10 +17,13 @@ and move and rename `Mdns` to `async_io::Behaviour`. See [PR 3096].
|
||||
|
||||
- Use `trust-dns-proto` to parse DNS messages. See [PR 3102].
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.62.0. See [PR 3090].
|
||||
|
||||
[discussion 2174]: https://github.com/libp2p/rust-libp2p/discussions/2174
|
||||
[PR 3096]: https://github.com/libp2p/rust-libp2p/pull/3096
|
||||
[PR 3011]: https://github.com/libp2p/rust-libp2p/pull/3011
|
||||
[PR 3102]: https://github.com/libp2p/rust-libp2p/pull/3102
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.41.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-mdns"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.62.0"
|
||||
version = "0.42.0"
|
||||
description = "Implementation of the libp2p mDNS discovery method"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
@ -10,8 +10,11 @@
|
||||
- Replace `Handler`'s `ConnectionHandler` implemention `inject_*` methods with the new `on_*` methods.
|
||||
See [PR 3085].
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.62.0. See [PR 3090].
|
||||
|
||||
[PR 3085]: https://github.com/libp2p/rust-libp2p/pull/3085
|
||||
[PR 3011]: https://github.com/libp2p/rust-libp2p/pull/3011
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.40.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-ping"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.62.0"
|
||||
description = "Ping protocol for libp2p"
|
||||
version = "0.41.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
@ -12,8 +12,11 @@
|
||||
- Replace `client::Handler` and `relay::Handler`'s `ConnectionHandler` implemention `inject_*` methods
|
||||
with the new `on_*` methods. See [PR 3085].
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.62.0. See [PR 3090].
|
||||
|
||||
[PR 3085]: https://github.com/libp2p/rust-libp2p/pull/3085
|
||||
[PR 3011]: https://github.com/libp2p/rust-libp2p/pull/3011
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.13.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-relay"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.62.0"
|
||||
description = "Communications relaying for libp2p"
|
||||
version = "0.14.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>", "Max Inden <mail@max-inden.de>"]
|
||||
|
@ -9,8 +9,11 @@
|
||||
- Replace `Client` and `Server`'s `NetworkBehaviour` implemention `inject_*` methods with the new `on_*` methods.
|
||||
See [PR 3011].
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.62.0. See [PR 3090].
|
||||
|
||||
[PR 3011]: https://github.com/libp2p/rust-libp2p/pull/3011
|
||||
[PR 3058]: https://github.com/libp2p/rust-libp2p/pull/3058
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.10.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-rendezvous"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.62.0"
|
||||
description = "Rendezvous protocol for libp2p"
|
||||
version = "0.11.0"
|
||||
authors = ["The COMIT guys <hello@comit.network>"]
|
||||
|
@ -178,7 +178,7 @@ impl NetworkBehaviour for Behaviour {
|
||||
fn addresses_of_peer(&mut self, peer: &PeerId) -> Vec<Multiaddr> {
|
||||
self.discovered_peers
|
||||
.iter()
|
||||
.filter_map(|((candidate, _), addresses)| (candidate == peer).then(|| addresses))
|
||||
.filter_map(|((candidate, _), addresses)| (candidate == peer).then_some(addresses))
|
||||
.flatten()
|
||||
.cloned()
|
||||
.collect()
|
||||
|
@ -10,8 +10,11 @@
|
||||
- Replace `RequestResponseHandler`'s `ConnectionHandler` implemention `inject_*` methods
|
||||
with the new `on_*` methods. See [PR 3085].
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.62.0. See [PR 3090].
|
||||
|
||||
[PR 3085]: https://github.com/libp2p/rust-libp2p/pull/3085
|
||||
[PR 3011]: https://github.com/libp2p/rust-libp2p/pull/3011
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.22.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-request-response"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.62.0"
|
||||
description = "Generic Request/Response Protocols"
|
||||
version = "0.23.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
@ -117,6 +117,7 @@ pub use libp2p_swarm as swarm;
|
||||
pub use libp2p_tcp as tcp;
|
||||
#[cfg(feature = "tls")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "tls")))]
|
||||
#[cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))]
|
||||
#[doc(inline)]
|
||||
pub use libp2p_tls as tls;
|
||||
#[cfg(feature = "uds")]
|
||||
@ -127,6 +128,7 @@ pub use libp2p_uds as uds;
|
||||
pub use libp2p_wasm_ext as wasm_ext;
|
||||
#[cfg(feature = "webrtc")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "webrtc")))]
|
||||
#[cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))]
|
||||
#[doc(inline)]
|
||||
pub use libp2p_webrtc as webrtc;
|
||||
#[cfg(feature = "websocket")]
|
||||
|
@ -7,8 +7,11 @@
|
||||
- Add `prelude` configuration option.
|
||||
The derive-macro generates code that needs to refer to various symbols. See [PR 3055].
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.60.0. See [PR 3090].
|
||||
|
||||
[PR 3011]: https://github.com/libp2p/rust-libp2p/pull/3011
|
||||
[PR 3055]: https://github.com/libp2p/rust-libp2p/pull/3055
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.30.1
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-swarm-derive"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.60.0"
|
||||
description = "Procedural macros of libp2p-core"
|
||||
version = "0.30.2"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
@ -94,11 +94,14 @@
|
||||
- `SwarmBuilder::new`
|
||||
- `SwarmBuilder::executor`
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.62.0. See [PR 3090].
|
||||
|
||||
[PR 3085]: https://github.com/libp2p/rust-libp2p/pull/3085
|
||||
[PR 3011]: https://github.com/libp2p/rust-libp2p/pull/3011
|
||||
[PR 3055]: https://github.com/libp2p/rust-libp2p/pull/3055
|
||||
[PR 3097]: https://github.com/libp2p/rust-libp2p/pull/3097
|
||||
[Issue 3107]: https://github.com/libp2p/rust-libp2p/issues/3107
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.40.1
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-swarm"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.62.0"
|
||||
description = "The libp2p swarm"
|
||||
version = "0.41.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
@ -24,8 +24,10 @@ rand = "0.8"
|
||||
smallvec = "1.6.1"
|
||||
thiserror = "1.0"
|
||||
void = "1"
|
||||
tokio = { version = "1.15", features = ["rt"], optional = true }
|
||||
|
||||
[target.'cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))'.dependencies]
|
||||
async-std = { version = "1.6.2", optional = true }
|
||||
tokio = { version = "1.15", features = ["rt"], optional = true }
|
||||
|
||||
[features]
|
||||
macros = ["dep:libp2p-swarm-derive"]
|
||||
|
@ -25,22 +25,34 @@ impl Executor for ThreadPool {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "tokio")]
|
||||
#[cfg(all(
|
||||
feature = "tokio",
|
||||
not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown"))
|
||||
))]
|
||||
#[derive(Default, Debug, Clone, Copy)]
|
||||
pub(crate) struct TokioExecutor;
|
||||
|
||||
#[cfg(feature = "tokio")]
|
||||
#[cfg(all(
|
||||
feature = "tokio",
|
||||
not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown"))
|
||||
))]
|
||||
impl Executor for TokioExecutor {
|
||||
fn exec(&self, future: Pin<Box<dyn Future<Output = ()> + Send>>) {
|
||||
let _ = tokio::spawn(future);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "async-std")]
|
||||
#[cfg(all(
|
||||
feature = "async-std",
|
||||
not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown"))
|
||||
))]
|
||||
#[derive(Default, Debug, Clone, Copy)]
|
||||
pub(crate) struct AsyncStdExecutor;
|
||||
|
||||
#[cfg(feature = "async-std")]
|
||||
#[cfg(all(
|
||||
feature = "async-std",
|
||||
not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown"))
|
||||
))]
|
||||
impl Executor for AsyncStdExecutor {
|
||||
fn exec(&self, future: Pin<Box<dyn Future<Output = ()> + Send>>) {
|
||||
let _ = async_std::task::spawn(future);
|
||||
|
@ -366,7 +366,10 @@ where
|
||||
}
|
||||
|
||||
/// Builds a new `Swarm` with a tokio executor.
|
||||
#[cfg(feature = "tokio")]
|
||||
#[cfg(all(
|
||||
feature = "tokio",
|
||||
not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown"))
|
||||
))]
|
||||
pub fn with_tokio_executor(
|
||||
transport: transport::Boxed<(PeerId, StreamMuxerBox)>,
|
||||
behaviour: TBehaviour,
|
||||
@ -381,7 +384,10 @@ where
|
||||
}
|
||||
|
||||
/// Builds a new `Swarm` with an async-std executor.
|
||||
#[cfg(feature = "async-std")]
|
||||
#[cfg(all(
|
||||
feature = "async-std",
|
||||
not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown"))
|
||||
))]
|
||||
pub fn with_async_std_executor(
|
||||
transport: transport::Boxed<(PeerId, StreamMuxerBox)>,
|
||||
behaviour: TBehaviour,
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
- Update to `libp2p-core` `v0.38.0`.
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.60.0. See [PR 3090].
|
||||
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.37.0
|
||||
|
||||
- Update to `libp2p-core` `v0.37.0`.
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-deflate"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.60.0"
|
||||
description = "Deflate encryption protocol for libp2p"
|
||||
version = "0.38.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
- Update to `libp2p-core` `v0.38.0`.
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.60.0. See [PR 3090].
|
||||
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.37.0
|
||||
|
||||
- Remove default features. If you previously depended on `async-std` you need to enable this explicitly now. See [PR 2918].
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-dns"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.60.0"
|
||||
description = "DNS transport implementation for libp2p"
|
||||
version = "0.38.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
@ -4,7 +4,10 @@
|
||||
|
||||
- Update to `libp2p-core` `v0.38.0`.
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.60.0. See [PR 3090].
|
||||
|
||||
[PR 3058]: https://github.com/libp2p/rust-libp2p/pull/3058
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.40.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-noise"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.60.0"
|
||||
description = "Cryptographic handshake protocol using the noise framework."
|
||||
version = "0.41.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
@ -4,7 +4,10 @@
|
||||
|
||||
- Update to `libp2p-core` `v0.38.0`.
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.60.0. See [PR 3090].
|
||||
|
||||
[PR 3058]: https://github.com/libp2p/rust-libp2p/pull/3058
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.37.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-plaintext"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.60.0"
|
||||
description = "Plaintext encryption dummy protocol for libp2p"
|
||||
version = "0.38.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
@ -1,3 +1,9 @@
|
||||
# 0.22.2 [unreleased]
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.60.0. See [PR 3090].
|
||||
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.22.1
|
||||
|
||||
- Bump rand to 0.8 and quickcheck to 1. See [PR 2857].
|
||||
|
@ -1,9 +1,9 @@
|
||||
[package]
|
||||
name = "libp2p-pnet"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.60.0"
|
||||
description = "Private swarm support for libp2p"
|
||||
version = "0.22.1"
|
||||
version = "0.22.2"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
license = "MIT"
|
||||
repository = "https://github.com/libp2p/rust-libp2p"
|
||||
|
@ -3,12 +3,13 @@ name = "libp2p-quic"
|
||||
version = "0.7.0-alpha"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2021"
|
||||
rust-version = "1.62.0"
|
||||
description = "TLS based QUIC transport implementation for libp2p"
|
||||
repository = "https://github.com/libp2p/rust-libp2p"
|
||||
license = "MIT"
|
||||
|
||||
[dependencies]
|
||||
async-std = { version = "1.12.0", default-features = false, optional = true }
|
||||
async-std = { version = "1.12.0", optional = true }
|
||||
bytes = "1.2.1"
|
||||
futures = "0.3.15"
|
||||
futures-timer = "3.0.2"
|
||||
|
@ -288,7 +288,7 @@ fn prop<P: Provider + BlockOn>(
|
||||
// Wait for all streams to complete.
|
||||
P::block_on(
|
||||
completed_streams_rx
|
||||
.take(completed_streams as usize)
|
||||
.take(completed_streams)
|
||||
.collect::<Vec<_>>(),
|
||||
Duration::from_secs(30),
|
||||
);
|
||||
|
@ -8,8 +8,11 @@
|
||||
|
||||
- Update to `libp2p-core` `v0.38.0`.
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.60.0. See [PR 3090].
|
||||
|
||||
[PR 3101]: https://github.com/libp2p/rust-libp2p/pull/3101
|
||||
[PR 2961]: https://github.com/libp2p/rust-libp2p/pull/2961
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.37.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-tcp"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.60.0"
|
||||
description = "TCP/IP transport protocol for libp2p"
|
||||
version = "0.38.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
@ -2,6 +2,7 @@
|
||||
name = "libp2p-tls"
|
||||
version = "0.1.0-alpha"
|
||||
edition = "2021"
|
||||
rust-version = "1.60.0"
|
||||
license = "MIT"
|
||||
exclude = ["src/test_assets"]
|
||||
|
||||
@ -25,7 +26,7 @@ features = ["dangerous_configuration"] # Must enable this to allow for custom ve
|
||||
[dev-dependencies]
|
||||
hex = "0.4.3"
|
||||
hex-literal = "0.3.4"
|
||||
libp2p = { path = "../..", features = ["yamux"], default-features = false }
|
||||
libp2p = { path = "../..", features = ["yamux", "rsa", "ecdsa", "secp256k1"], default-features = false }
|
||||
tokio = { version = "1.21.1", features = ["full"] }
|
||||
|
||||
# Passing arguments to the docsrs builder in order to properly document cfg's.
|
||||
|
@ -1,5 +1,9 @@
|
||||
# 0.37.0 [unreleased]
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.60.0. See [PR 3090].
|
||||
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.36.0
|
||||
|
||||
- Remove default features. If you previously depended on `async-std` you need to enable this explicitly now. See [PR 2918].
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-uds"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.60.0"
|
||||
description = "Unix domain sockets transport for libp2p"
|
||||
version = "0.37.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
- Update to `libp2p-core` `v0.38.0`.
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.60.0. See [PR 3090].
|
||||
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.37.0
|
||||
|
||||
- Update to `libp2p-core` `v0.37.0`.
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-wasm-ext"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.60.0"
|
||||
description = "Allows passing in an external transport in a WASM environment"
|
||||
version = "0.38.0"
|
||||
authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>"]
|
||||
|
@ -6,6 +6,7 @@ description = "WebRTC transport for libp2p"
|
||||
repository = "https://github.com/libp2p/rust-libp2p"
|
||||
license = "MIT"
|
||||
edition = "2021"
|
||||
rust-version = "1.60.0"
|
||||
keywords = ["peer-to-peer", "libp2p", "networking"]
|
||||
categories = ["network-programming", "asynchronous"]
|
||||
|
||||
|
@ -107,7 +107,7 @@ mod tests {
|
||||
let prologue1 = noise_prologue(a, b);
|
||||
let prologue2 = noise_prologue(b, a);
|
||||
|
||||
assert_eq!(hex::encode(&prologue1), "6c69627032702d7765627274632d6e6f6973653a12203e79af40d6059617a0d83b83a52ce73b0c1f37a72c6043ad2969e2351bdca870122030fc9f469c207419dfdd0aab5f27a86c973c94e40548db9375cca2e915973b99");
|
||||
assert_eq!(hex::encode(&prologue2), "6c69627032702d7765627274632d6e6f6973653a122030fc9f469c207419dfdd0aab5f27a86c973c94e40548db9375cca2e915973b9912203e79af40d6059617a0d83b83a52ce73b0c1f37a72c6043ad2969e2351bdca870");
|
||||
assert_eq!(hex::encode(prologue1), "6c69627032702d7765627274632d6e6f6973653a12203e79af40d6059617a0d83b83a52ce73b0c1f37a72c6043ad2969e2351bdca870122030fc9f469c207419dfdd0aab5f27a86c973c94e40548db9375cca2e915973b99");
|
||||
assert_eq!(hex::encode(prologue2), "6c69627032702d7765627274632d6e6f6973653a122030fc9f469c207419dfdd0aab5f27a86c973c94e40548db9375cca2e915973b9912203e79af40d6059617a0d83b83a52ce73b0c1f37a72c6043ad2969e2351bdca870");
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
- Update to `libp2p-core` `v0.38.0`.
|
||||
|
||||
- Update `rust-version` to reflect the actual MSRV: 1.60.0. See [PR 3090].
|
||||
|
||||
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
|
||||
|
||||
# 0.39.0
|
||||
|
||||
- Update to `libp2p-core` `v0.37.0`.
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "libp2p-websocket"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.60.0"
|
||||
description = "WebSocket transport for libp2p"
|
||||
version = "0.40.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user