From 0e29efe3813c785006a14044a621c232b9cef159 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 2 Mar 2023 17:03:52 +1100 Subject: [PATCH 1/8] Move `libp2p` crate to a dedicated directory --- Cargo.toml | 202 +----------------- README.md | 4 +- interop-tests/Cargo.toml | 2 +- libp2p/Cargo.toml | 183 ++++++++++++++++ {examples => libp2p/examples}/README.md | 0 {examples => libp2p/examples}/chat-tokio.rs | 0 {examples => libp2p/examples}/chat.rs | 0 .../examples}/distributed-key-value-store.rs | 0 {examples => libp2p/examples}/file-sharing.rs | 0 .../examples}/gossipsub-chat.rs | 0 {examples => libp2p/examples}/ipfs-kad.rs | 0 {examples => libp2p/examples}/ipfs-private.rs | 0 .../examples}/mdns-passive-discovery.rs | 0 {examples => libp2p/examples}/ping.rs | 0 {src => libp2p/src}/bandwidth.rs | 0 {src => libp2p/src}/lib.rs | 0 {src => libp2p/src}/transport_ext.rs | 0 {src => libp2p/src}/tutorials.rs | 0 .../src}/tutorials/hole_punching.rs | 0 {src => libp2p/src}/tutorials/ping.rs | 0 20 files changed, 195 insertions(+), 196 deletions(-) create mode 100644 libp2p/Cargo.toml rename {examples => libp2p/examples}/README.md (100%) rename {examples => libp2p/examples}/chat-tokio.rs (100%) rename {examples => libp2p/examples}/chat.rs (100%) rename {examples => libp2p/examples}/distributed-key-value-store.rs (100%) rename {examples => libp2p/examples}/file-sharing.rs (100%) rename {examples => libp2p/examples}/gossipsub-chat.rs (100%) rename {examples => libp2p/examples}/ipfs-kad.rs (100%) rename {examples => libp2p/examples}/ipfs-private.rs (100%) rename {examples => libp2p/examples}/mdns-passive-discovery.rs (100%) rename {examples => libp2p/examples}/ping.rs (100%) rename {src => libp2p/src}/bandwidth.rs (100%) rename {src => libp2p/src}/lib.rs (100%) rename {src => libp2p/src}/transport_ext.rs (100%) rename {src => libp2p/src}/tutorials.rs (100%) rename {src => libp2p/src}/tutorials/hole_punching.rs (100%) rename {src => libp2p/src}/tutorials/ping.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index fa2a6d626ad..7a7e41e4b0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,224 +1,40 @@ -[package] -name = "libp2p" -edition = "2021" -rust-version = "1.65.0" -description = "Peer-to-peer networking library" -version = "0.51.0" -authors = ["Parity Technologies "] -license = "MIT" -repository = "https://github.com/libp2p/rust-libp2p" -keywords = ["peer-to-peer", "libp2p", "networking"] -categories = ["network-programming", "asynchronous"] - -[features] -full = [ - "async-std", - "autonat", - "dcutr", - "deflate", - "dns", - "ecdsa", - "floodsub", - "gossipsub", - "identify", - "kad", - "mdns", - "metrics", - "mplex", - "noise", - "ping", - "plaintext", - "pnet", - "quic", - "macros", - "relay", - "rendezvous", - "request-response", - "rsa", - "secp256k1", - "serde", - "tcp", - "tls", - "tokio", - "uds", - "wasm-bindgen", - "wasm-ext", - "wasm-ext-websocket", - "webrtc", - "websocket", - "yamux", -] - -async-std = ["libp2p-swarm/async-std", "libp2p-mdns?/async-io", "libp2p-tcp?/async-io", "libp2p-dns?/async-std", "libp2p-quic?/async-std"] -autonat = ["dep:libp2p-autonat"] -dcutr = ["dep:libp2p-dcutr", "libp2p-metrics?/dcutr"] -deflate = ["dep:libp2p-deflate"] -dns = ["dep:libp2p-dns"] -ecdsa = ["libp2p-core/ecdsa"] -floodsub = ["dep:libp2p-floodsub"] -gossipsub = ["dep:libp2p-gossipsub", "libp2p-metrics?/gossipsub"] -identify = ["dep:libp2p-identify", "libp2p-metrics?/identify"] -kad = ["dep:libp2p-kad", "libp2p-metrics?/kad"] -macros = ["libp2p-swarm/macros"] -mdns = ["dep:libp2p-mdns"] -metrics = ["dep:libp2p-metrics"] -mplex = ["dep:libp2p-mplex"] -noise = ["dep:libp2p-noise"] -ping = ["dep:libp2p-ping", "libp2p-metrics?/ping"] -plaintext = ["dep:libp2p-plaintext"] -pnet = ["dep:libp2p-pnet"] -quic = ["dep:libp2p-quic"] -relay = ["dep:libp2p-relay", "libp2p-metrics?/relay"] -rendezvous = ["dep:libp2p-rendezvous"] -request-response = ["dep:libp2p-request-response"] -rsa = ["libp2p-core/rsa"] -secp256k1 = ["libp2p-core/secp256k1"] -serde = ["libp2p-core/serde", "libp2p-kad?/serde", "libp2p-gossipsub?/serde"] -tcp = ["dep:libp2p-tcp"] -tls = ["dep:libp2p-tls"] -tokio = ["libp2p-swarm/tokio", "libp2p-mdns?/tokio", "libp2p-tcp?/tokio", "libp2p-dns?/tokio", "libp2p-quic?/tokio", "libp2p-webrtc?/tokio"] -uds = ["dep:libp2p-uds"] -wasm-bindgen = ["futures-timer/wasm-bindgen", "instant/wasm-bindgen", "getrandom/js", "libp2p-swarm/wasm-bindgen"] -wasm-ext = ["dep:libp2p-wasm-ext"] -wasm-ext-websocket = ["wasm-ext", "libp2p-wasm-ext?/websocket"] -webrtc = ["dep:libp2p-webrtc", "libp2p-webrtc?/pem"] -websocket = ["dep:libp2p-websocket"] -yamux = ["dep:libp2p-yamux"] - -[dependencies] -bytes = "1" -futures = "0.3.26" -futures-timer = "3.0.2" # Explicit dependency to be used in `wasm-bindgen` feature -getrandom = "0.2.3" # Explicit dependency to be used in `wasm-bindgen` feature -instant = "0.1.11" # Explicit dependency to be used in `wasm-bindgen` feature - -libp2p-autonat = { version = "0.10.0", path = "protocols/autonat", optional = true } -libp2p-core = { version = "0.39.0", path = "core" } -libp2p-dcutr = { version = "0.9.0", path = "protocols/dcutr", optional = true } -libp2p-floodsub = { version = "0.42.0", path = "protocols/floodsub", optional = true } -libp2p-identify = { version = "0.42.0", path = "protocols/identify", optional = true } -libp2p-kad = { version = "0.43.0", path = "protocols/kad", optional = true } -libp2p-metrics = { version = "0.12.0", path = "misc/metrics", optional = true } -libp2p-mplex = { version = "0.39.0", path = "muxers/mplex", optional = true } -libp2p-noise = { version = "0.42.0", path = "transports/noise", optional = true } -libp2p-ping = { version = "0.42.0", path = "protocols/ping", optional = true } -libp2p-plaintext = { version = "0.39.0", path = "transports/plaintext", optional = true } -libp2p-pnet = { version = "0.22.2", path = "transports/pnet", optional = true } -libp2p-relay = { version = "0.15.0", path = "protocols/relay", optional = true } -libp2p-rendezvous = { version = "0.12.0", path = "protocols/rendezvous", optional = true } -libp2p-request-response = { version = "0.24.0", path = "protocols/request-response", optional = true } -libp2p-swarm = { version = "0.42.0", path = "swarm" } -libp2p-uds = { version = "0.38.0", path = "transports/uds", optional = true } -libp2p-wasm-ext = { version = "0.39.0", path = "transports/wasm-ext", optional = true } -libp2p-yamux = { version = "0.43.0", path = "muxers/yamux", optional = true } -multiaddr = { version = "0.17.0" } -pin-project = "1.0.0" - -[target.'cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))'.dependencies] -libp2p-deflate = { version = "0.39.0", path = "transports/deflate", optional = true } -libp2p-dns = { version = "0.39.0", path = "transports/dns", optional = true } -libp2p-mdns = { version = "0.43.0", path = "protocols/mdns", optional = true } -libp2p-quic = { version = "0.7.0-alpha.2", path = "transports/quic", optional = true } -libp2p-tcp = { version = "0.39.0", path = "transports/tcp", optional = true } -libp2p-tls = { version = "0.1.0-alpha.2", path = "transports/tls", optional = true } -libp2p-webrtc = { version = "0.4.0-alpha.2", path = "transports/webrtc", optional = true } -libp2p-websocket = { version = "0.41.0", path = "transports/websocket", optional = true } - -[target.'cfg(not(target_os = "unknown"))'.dependencies] -libp2p-gossipsub = { version = "0.44.0", path = "protocols/gossipsub", optional = true } - -[dev-dependencies] -async-std = { version = "1.6.2", features = ["attributes"] } -async-trait = "0.1" -either = "1.8.0" -env_logger = "0.10.0" -clap = { version = "4.1.6", features = ["derive"] } -tokio = { version = "1.15", features = ["io-util", "io-std", "macros", "rt", "rt-multi-thread"] } - -libp2p-mplex = { path = "muxers/mplex" } -libp2p-noise = { path = "transports/noise" } -libp2p-tcp = { path = "transports/tcp", features = ["tokio"] } - [workspace] members = [ "core", + "interop-tests", + "libp2p", + "misc/keygen", "misc/metrics", "misc/multistream-select", - "misc/rw-stream-sink", - "misc/keygen", "misc/prost-codec", "misc/quickcheck-ext", + "misc/rw-stream-sink", "muxers/mplex", - "muxers/yamux", "muxers/test-harness", - "protocols/dcutr", + "muxers/yamux", "protocols/autonat", + "protocols/dcutr", "protocols/floodsub", "protocols/gossipsub", - "protocols/rendezvous", "protocols/identify", "protocols/kad", "protocols/mdns", "protocols/ping", "protocols/relay", + "protocols/rendezvous", "protocols/request-response", "swarm", "swarm-derive", - "interop-tests", "transports/deflate", "transports/dns", "transports/noise", - "transports/tls", "transports/plaintext", "transports/pnet", "transports/quic", "transports/tcp", + "transports/tls", "transports/uds", - "transports/websocket", "transports/wasm-ext", "transports/webrtc", - "interop-tests" + "transports/websocket", ] - -[[example]] -name = "chat" -required-features = ["full"] - -[[example]] -name = "chat-tokio" -required-features = ["full"] - -[[example]] -name = "file-sharing" -required-features = ["full"] - -[[example]] -name = "gossipsub-chat" -required-features = ["full"] - -[[example]] -name = "ipfs-private" -required-features = ["full"] - -[[example]] -name = "ipfs-kad" -required-features = ["full"] - -[[example]] -name = "ping" -required-features = ["full"] - -[[example]] -name = "mdns-passive-discovery" -required-features = ["full"] - -[[example]] -name = "distributed-key-value-store" -required-features = ["full"] - -# Passing arguments to the docsrs builder in order to properly document cfg's. -# More information: https://docs.rs/about/builds#cross-compiling -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] -rustc-args = ["--cfg", "docsrs"] diff --git a/README.md b/README.md index 615b9caff0e..85be4add93c 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This repository is the central place for Rust development of the [libp2p](https: - **Main documentation** can be found on https://docs.rs/libp2p. -- The **[examples](examples)** folder contains small binaries showcasing the +- The **[examples](libp2p/examples)** folder contains small binaries showcasing the many protocols in this repository. - For **security related issues** please [file a private security vulnerability @@ -56,7 +56,7 @@ The main components of this repository are structured as follows: * `misc/`: Utility libraries. - * `examples/`: Worked examples of built-in application protocols (see `protocols/`) + * `libp2p/examples/`: Worked examples of built-in application protocols (see `protocols/`) with common `Transport` configurations. ## Community Guidelines diff --git a/interop-tests/Cargo.toml b/interop-tests/Cargo.toml index 38c6ea1cc9d..5b38b61901e 100644 --- a/interop-tests/Cargo.toml +++ b/interop-tests/Cargo.toml @@ -9,7 +9,7 @@ anyhow = "1" either = "1.8.0" env_logger = "0.10.0" futures = "0.3.26" -libp2p = { path = "../", features = ["websocket", "quic", "mplex", "yamux", "tcp", "tokio", "ping", "noise", "tls", "dns", "rsa", "macros", "webrtc"] } +libp2p = { path = "../libp2p", features = ["websocket", "quic", "mplex", "yamux", "tcp", "tokio", "ping", "noise", "tls", "dns", "rsa", "macros", "webrtc"] } log = "0.4" rand = "0.8.5" redis = { version = "0.22.1", default-features = false, features = ["tokio-comp"] } diff --git a/libp2p/Cargo.toml b/libp2p/Cargo.toml new file mode 100644 index 00000000000..3dfc978aeaf --- /dev/null +++ b/libp2p/Cargo.toml @@ -0,0 +1,183 @@ +[package] +name = "libp2p" +edition = "2021" +rust-version = "1.65.0" +description = "Peer-to-peer networking library" +version = "0.51.0" +authors = ["Parity Technologies "] +license = "MIT" +repository = "https://github.com/libp2p/rust-libp2p" +keywords = ["peer-to-peer", "libp2p", "networking"] +categories = ["network-programming", "asynchronous"] + +[features] +full = [ + "async-std", + "autonat", + "dcutr", + "deflate", + "dns", + "ecdsa", + "floodsub", + "gossipsub", + "identify", + "kad", + "mdns", + "metrics", + "mplex", + "noise", + "ping", + "plaintext", + "pnet", + "quic", + "macros", + "relay", + "rendezvous", + "request-response", + "rsa", + "secp256k1", + "serde", + "tcp", + "tls", + "tokio", + "uds", + "wasm-bindgen", + "wasm-ext", + "wasm-ext-websocket", + "webrtc", + "websocket", + "yamux", +] + +async-std = ["libp2p-swarm/async-std", "libp2p-mdns?/async-io", "libp2p-tcp?/async-io", "libp2p-dns?/async-std", "libp2p-quic?/async-std"] +autonat = ["dep:libp2p-autonat"] +dcutr = ["dep:libp2p-dcutr", "libp2p-metrics?/dcutr"] +deflate = ["dep:libp2p-deflate"] +dns = ["dep:libp2p-dns"] +ecdsa = ["libp2p-core/ecdsa"] +floodsub = ["dep:libp2p-floodsub"] +gossipsub = ["dep:libp2p-gossipsub", "libp2p-metrics?/gossipsub"] +identify = ["dep:libp2p-identify", "libp2p-metrics?/identify"] +kad = ["dep:libp2p-kad", "libp2p-metrics?/kad"] +macros = ["libp2p-swarm/macros"] +mdns = ["dep:libp2p-mdns"] +metrics = ["dep:libp2p-metrics"] +mplex = ["dep:libp2p-mplex"] +noise = ["dep:libp2p-noise"] +ping = ["dep:libp2p-ping", "libp2p-metrics?/ping"] +plaintext = ["dep:libp2p-plaintext"] +pnet = ["dep:libp2p-pnet"] +quic = ["dep:libp2p-quic"] +relay = ["dep:libp2p-relay", "libp2p-metrics?/relay"] +rendezvous = ["dep:libp2p-rendezvous"] +request-response = ["dep:libp2p-request-response"] +rsa = ["libp2p-core/rsa"] +secp256k1 = ["libp2p-core/secp256k1"] +serde = ["libp2p-core/serde", "libp2p-kad?/serde", "libp2p-gossipsub?/serde"] +tcp = ["dep:libp2p-tcp"] +tls = ["dep:libp2p-tls"] +tokio = ["libp2p-swarm/tokio", "libp2p-mdns?/tokio", "libp2p-tcp?/tokio", "libp2p-dns?/tokio", "libp2p-quic?/tokio", "libp2p-webrtc?/tokio"] +uds = ["dep:libp2p-uds"] +wasm-bindgen = ["futures-timer/wasm-bindgen", "instant/wasm-bindgen", "getrandom/js", "libp2p-swarm/wasm-bindgen"] +wasm-ext = ["dep:libp2p-wasm-ext"] +wasm-ext-websocket = ["wasm-ext", "libp2p-wasm-ext?/websocket"] +webrtc = ["dep:libp2p-webrtc", "libp2p-webrtc?/pem"] +websocket = ["dep:libp2p-websocket"] +yamux = ["dep:libp2p-yamux"] + +[dependencies] +bytes = "1" +futures = "0.3.26" +futures-timer = "3.0.2" # Explicit dependency to be used in `wasm-bindgen` feature +getrandom = "0.2.3" # Explicit dependency to be used in `wasm-bindgen` feature +instant = "0.1.11" # Explicit dependency to be used in `wasm-bindgen` feature + +libp2p-autonat = { version = "0.10.0", path = "../protocols/autonat", optional = true } +libp2p-core = { version = "0.39.0", path = "../core" } +libp2p-dcutr = { version = "0.9.0", path = "../protocols/dcutr", optional = true } +libp2p-floodsub = { version = "0.42.0", path = "../protocols/floodsub", optional = true } +libp2p-identify = { version = "0.42.0", path = "../protocols/identify", optional = true } +libp2p-kad = { version = "0.43.0", path = "../protocols/kad", optional = true } +libp2p-metrics = { version = "0.12.0", path = "../misc/metrics", optional = true } +libp2p-mplex = { version = "0.39.0", path = "../muxers/mplex", optional = true } +libp2p-noise = { version = "0.42.0", path = "../transports/noise", optional = true } +libp2p-ping = { version = "0.42.0", path = "../protocols/ping", optional = true } +libp2p-plaintext = { version = "0.39.0", path = "../transports/plaintext", optional = true } +libp2p-pnet = { version = "0.22.2", path = "../transports/pnet", optional = true } +libp2p-relay = { version = "0.15.0", path = "../protocols/relay", optional = true } +libp2p-rendezvous = { version = "0.12.0", path = "../protocols/rendezvous", optional = true } +libp2p-request-response = { version = "0.24.0", path = "../protocols/request-response", optional = true } +libp2p-swarm = { version = "0.42.0", path = "../swarm" } +libp2p-uds = { version = "0.38.0", path = "../transports/uds", optional = true } +libp2p-wasm-ext = { version = "0.39.0", path = "../transports/wasm-ext", optional = true } +libp2p-yamux = { version = "0.43.0", path = "../muxers/yamux", optional = true } +multiaddr = { version = "0.17.0" } +pin-project = "1.0.0" + +[target.'cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))'.dependencies] +libp2p-deflate = { version = "0.39.0", path = "../transports/deflate", optional = true } +libp2p-dns = { version = "0.39.0", path = "../transports/dns", optional = true } +libp2p-mdns = { version = "0.43.0", path = "../protocols/mdns", optional = true } +libp2p-quic = { version = "0.7.0-alpha.2", path = "../transports/quic", optional = true } +libp2p-tcp = { version = "0.39.0", path = "../transports/tcp", optional = true } +libp2p-tls = { version = "0.1.0-alpha.2", path = "../transports/tls", optional = true } +libp2p-webrtc = { version = "0.4.0-alpha.2", path = "../transports/webrtc", optional = true } +libp2p-websocket = { version = "0.41.0", path = "../transports/websocket", optional = true } + +[target.'cfg(not(target_os = "unknown"))'.dependencies] +libp2p-gossipsub = { version = "0.44.0", path = "../protocols/gossipsub", optional = true } + +[dev-dependencies] +async-std = { version = "1.6.2", features = ["attributes"] } +async-trait = "0.1" +either = "1.8.0" +env_logger = "0.10.0" +clap = { version = "4.1.6", features = ["derive"] } +tokio = { version = "1.15", features = ["io-util", "io-std", "macros", "rt", "rt-multi-thread"] } + +libp2p-mplex = { path = "../muxers/mplex" } +libp2p-noise = { path = "../transports/noise" } +libp2p-tcp = { path = "../transports/tcp", features = ["tokio"] } + +[[example]] +name = "chat" +required-features = ["full"] + +[[example]] +name = "chat-tokio" +required-features = ["full"] + +[[example]] +name = "file-sharing" +required-features = ["full"] + +[[example]] +name = "gossipsub-chat" +required-features = ["full"] + +[[example]] +name = "ipfs-private" +required-features = ["full"] + +[[example]] +name = "ipfs-kad" +required-features = ["full"] + +[[example]] +name = "ping" +required-features = ["full"] + +[[example]] +name = "mdns-passive-discovery" +required-features = ["full"] + +[[example]] +name = "distributed-key-value-store" +required-features = ["full"] + +# Passing arguments to the docsrs builder in order to properly document cfg's. +# More information: https://docs.rs/about/builds#cross-compiling +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] +rustc-args = ["--cfg", "docsrs"] diff --git a/examples/README.md b/libp2p/examples/README.md similarity index 100% rename from examples/README.md rename to libp2p/examples/README.md diff --git a/examples/chat-tokio.rs b/libp2p/examples/chat-tokio.rs similarity index 100% rename from examples/chat-tokio.rs rename to libp2p/examples/chat-tokio.rs diff --git a/examples/chat.rs b/libp2p/examples/chat.rs similarity index 100% rename from examples/chat.rs rename to libp2p/examples/chat.rs diff --git a/examples/distributed-key-value-store.rs b/libp2p/examples/distributed-key-value-store.rs similarity index 100% rename from examples/distributed-key-value-store.rs rename to libp2p/examples/distributed-key-value-store.rs diff --git a/examples/file-sharing.rs b/libp2p/examples/file-sharing.rs similarity index 100% rename from examples/file-sharing.rs rename to libp2p/examples/file-sharing.rs diff --git a/examples/gossipsub-chat.rs b/libp2p/examples/gossipsub-chat.rs similarity index 100% rename from examples/gossipsub-chat.rs rename to libp2p/examples/gossipsub-chat.rs diff --git a/examples/ipfs-kad.rs b/libp2p/examples/ipfs-kad.rs similarity index 100% rename from examples/ipfs-kad.rs rename to libp2p/examples/ipfs-kad.rs diff --git a/examples/ipfs-private.rs b/libp2p/examples/ipfs-private.rs similarity index 100% rename from examples/ipfs-private.rs rename to libp2p/examples/ipfs-private.rs diff --git a/examples/mdns-passive-discovery.rs b/libp2p/examples/mdns-passive-discovery.rs similarity index 100% rename from examples/mdns-passive-discovery.rs rename to libp2p/examples/mdns-passive-discovery.rs diff --git a/examples/ping.rs b/libp2p/examples/ping.rs similarity index 100% rename from examples/ping.rs rename to libp2p/examples/ping.rs diff --git a/src/bandwidth.rs b/libp2p/src/bandwidth.rs similarity index 100% rename from src/bandwidth.rs rename to libp2p/src/bandwidth.rs diff --git a/src/lib.rs b/libp2p/src/lib.rs similarity index 100% rename from src/lib.rs rename to libp2p/src/lib.rs diff --git a/src/transport_ext.rs b/libp2p/src/transport_ext.rs similarity index 100% rename from src/transport_ext.rs rename to libp2p/src/transport_ext.rs diff --git a/src/tutorials.rs b/libp2p/src/tutorials.rs similarity index 100% rename from src/tutorials.rs rename to libp2p/src/tutorials.rs diff --git a/src/tutorials/hole_punching.rs b/libp2p/src/tutorials/hole_punching.rs similarity index 100% rename from src/tutorials/hole_punching.rs rename to libp2p/src/tutorials/hole_punching.rs diff --git a/src/tutorials/ping.rs b/libp2p/src/tutorials/ping.rs similarity index 100% rename from src/tutorials/ping.rs rename to libp2p/src/tutorials/ping.rs From 36ce4cb7c0a522db2690eb6a996f9c62047820b4 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 2 Mar 2023 17:05:46 +1100 Subject: [PATCH 2/8] Move changelog --- CHANGELOG.md => libp2p/CHANGELOG.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename CHANGELOG.md => libp2p/CHANGELOG.md (100%) diff --git a/CHANGELOG.md b/libp2p/CHANGELOG.md similarity index 100% rename from CHANGELOG.md rename to libp2p/CHANGELOG.md From ec5b79059a8cc556eaecfe5f495e72d0d0411f42 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Wed, 8 Mar 2023 11:23:01 +0100 Subject: [PATCH 3/8] Add license to interop-tests --- interop-tests/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/interop-tests/Cargo.toml b/interop-tests/Cargo.toml index 5b38b61901e..62efe2cf54e 100644 --- a/interop-tests/Cargo.toml +++ b/interop-tests/Cargo.toml @@ -3,6 +3,7 @@ edition = "2021" name = "interop-tests" version = "0.1.0" publish = false +license = "MIT" [dependencies] anyhow = "1" From ef9b72078cab461e93bddd4c6d29aec3f8dd6cc0 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Wed, 8 Mar 2023 11:33:53 +0100 Subject: [PATCH 4/8] Move uds to wasm gated transports --- libp2p/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libp2p/Cargo.toml b/libp2p/Cargo.toml index f685a7a8a68..f2f49e4e361 100644 --- a/libp2p/Cargo.toml +++ b/libp2p/Cargo.toml @@ -108,7 +108,6 @@ libp2p-relay = { version = "0.15.0", path = "../protocols/relay", optional = tru libp2p-rendezvous = { version = "0.12.0", path = "../protocols/rendezvous", optional = true } libp2p-request-response = { version = "0.24.0", path = "../protocols/request-response", optional = true } libp2p-swarm = { version = "0.42.0", path = "../swarm" } -libp2p-uds = { version = "0.38.0", path = "../transports/uds", optional = true } libp2p-wasm-ext = { version = "0.39.0", path = "../transports/wasm-ext", optional = true } libp2p-yamux = { version = "0.43.0", path = "../muxers/yamux", optional = true } multiaddr = { version = "0.17.0" } @@ -121,6 +120,7 @@ libp2p-mdns = { version = "0.43.0", path = "../protocols/mdns", optional = true libp2p-quic = { version = "0.7.0-alpha.2", path = "../transports/quic", optional = true } libp2p-tcp = { version = "0.39.0", path = "../transports/tcp", optional = true } libp2p-tls = { version = "0.1.0-alpha.2", path = "../transports/tls", optional = true } +libp2p-uds = { version = "0.38.0", path = "../transports/uds", optional = true } libp2p-webrtc = { version = "0.4.0-alpha.2", path = "../transports/webrtc", optional = true } libp2p-websocket = { version = "0.41.0", path = "../transports/websocket", optional = true } From 8c61dbc5082f291ff246c603e26abdcf4e2d33a7 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Wed, 8 Mar 2023 11:34:52 +0100 Subject: [PATCH 5/8] Pin pre-release versions again --- libp2p/Cargo.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libp2p/Cargo.toml b/libp2p/Cargo.toml index f2f49e4e361..68ae6f9c351 100644 --- a/libp2p/Cargo.toml +++ b/libp2p/Cargo.toml @@ -117,11 +117,11 @@ pin-project = "1.0.0" libp2p-deflate = { version = "0.39.0", path = "../transports/deflate", optional = true } libp2p-dns = { version = "0.39.0", path = "../transports/dns", optional = true } libp2p-mdns = { version = "0.43.0", path = "../protocols/mdns", optional = true } -libp2p-quic = { version = "0.7.0-alpha.2", path = "../transports/quic", optional = true } +libp2p-quic = { version = "=0.7.0-alpha.2", path = "../transports/quic", optional = true } libp2p-tcp = { version = "0.39.0", path = "../transports/tcp", optional = true } -libp2p-tls = { version = "0.1.0-alpha.2", path = "../transports/tls", optional = true } +libp2p-tls = { version = "=0.1.0-alpha.2", path = "../transports/tls", optional = true } libp2p-uds = { version = "0.38.0", path = "../transports/uds", optional = true } -libp2p-webrtc = { version = "0.4.0-alpha.2", path = "../transports/webrtc", optional = true } +libp2p-webrtc = { version = "=0.4.0-alpha.2", path = "../transports/webrtc", optional = true } libp2p-websocket = { version = "0.41.0", path = "../transports/websocket", optional = true } [target.'cfg(not(target_os = "unknown"))'.dependencies] From 013b53be08e1ddb0f50299a82f68d8769ae61d09 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Wed, 8 Mar 2023 11:36:22 +0100 Subject: [PATCH 6/8] Restore order of `members` keys --- Cargo.toml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 76b32b2a75c..12c48f11471 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,41 +10,41 @@ members = [ "examples/ipfs-private", "examples/ping-example", "examples/rendezvous", - "interop-tests", - "libp2p", - "misc/keygen", "misc/metrics", "misc/multistream-select", + "misc/rw-stream-sink", + "misc/keygen", "misc/quick-protobuf-codec", "misc/quickcheck-ext", - "misc/rw-stream-sink", "muxers/mplex", - "muxers/test-harness", "muxers/yamux", - "protocols/autonat", + "muxers/test-harness", "protocols/dcutr", + "protocols/autonat", "protocols/floodsub", "protocols/gossipsub", + "protocols/rendezvous", "protocols/identify", "protocols/kad", "protocols/mdns", "protocols/ping", "protocols/relay", - "protocols/rendezvous", "protocols/request-response", "swarm", "swarm-derive", + "interop-tests", "swarm-test", "transports/deflate", "transports/dns", "transports/noise", + "transports/tls", "transports/plaintext", "transports/pnet", "transports/quic", "transports/tcp", - "transports/tls", "transports/uds", + "transports/websocket", "transports/wasm-ext", "transports/webrtc", - "transports/websocket", + "interop-tests" ] From 641cda131584ad55ccda339b73efbbb38adcaf8b Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Wed, 8 Mar 2023 11:53:32 +0100 Subject: [PATCH 7/8] License examples --- examples/chat-example/Cargo.toml | 1 + examples/dcutr/Cargo.toml | 1 + examples/distributed-key-value-store/Cargo.toml | 1 + examples/file-sharing/Cargo.toml | 1 + examples/identify/Cargo.toml | 1 + examples/ipfs-kad/Cargo.toml | 1 + examples/ipfs-private/Cargo.toml | 1 + examples/ping-example/Cargo.toml | 1 + examples/rendezvous/Cargo.toml | 1 + 9 files changed, 9 insertions(+) diff --git a/examples/chat-example/Cargo.toml b/examples/chat-example/Cargo.toml index 867ab4a4d5b..bfd2d7e0c2e 100644 --- a/examples/chat-example/Cargo.toml +++ b/examples/chat-example/Cargo.toml @@ -3,6 +3,7 @@ name = "chat-example" version = "0.1.0" edition = "2021" publish = false +license = "MIT" [dependencies] async-std = { version = "1.12", features = ["attributes"] } diff --git a/examples/dcutr/Cargo.toml b/examples/dcutr/Cargo.toml index 4e3ee30e4c3..4fc9ed740d1 100644 --- a/examples/dcutr/Cargo.toml +++ b/examples/dcutr/Cargo.toml @@ -3,6 +3,7 @@ name = "dcutr" version = "0.1.0" edition = "2021" publish = false +license = "MIT" [dependencies] clap = { version = "4.1.6", features = ["derive"] } diff --git a/examples/distributed-key-value-store/Cargo.toml b/examples/distributed-key-value-store/Cargo.toml index a6703c06b3f..6a6c05fec2f 100644 --- a/examples/distributed-key-value-store/Cargo.toml +++ b/examples/distributed-key-value-store/Cargo.toml @@ -3,6 +3,7 @@ name = "distributed-key-value-store" version = "0.1.0" edition = "2021" publish = false +license = "MIT" [dependencies] async-std = { version = "1.12", features = ["attributes"] } diff --git a/examples/file-sharing/Cargo.toml b/examples/file-sharing/Cargo.toml index 8cbd431ccd0..2880e6d96fc 100644 --- a/examples/file-sharing/Cargo.toml +++ b/examples/file-sharing/Cargo.toml @@ -3,6 +3,7 @@ name = "file-sharing" version = "0.1.0" edition = "2021" publish = false +license = "MIT" [dependencies] async-std = { version = "1.12", features = ["attributes"] } diff --git a/examples/identify/Cargo.toml b/examples/identify/Cargo.toml index f1c22e879f9..49415c0c6cc 100644 --- a/examples/identify/Cargo.toml +++ b/examples/identify/Cargo.toml @@ -3,6 +3,7 @@ name = "identify" version = "0.1.0" edition = "2021" publish = false +license = "MIT" [dependencies] async-std = { version = "1.12", features = ["attributes"] } diff --git a/examples/ipfs-kad/Cargo.toml b/examples/ipfs-kad/Cargo.toml index 67ea5c7e5e9..a1ab1a617e9 100644 --- a/examples/ipfs-kad/Cargo.toml +++ b/examples/ipfs-kad/Cargo.toml @@ -3,6 +3,7 @@ name = "ipfs-kad" version = "0.1.0" edition = "2021" publish = false +license = "MIT" [dependencies] async-std = { version = "1.12", features = ["attributes"] } diff --git a/examples/ipfs-private/Cargo.toml b/examples/ipfs-private/Cargo.toml index d5ed67381ab..72b9dbb03bb 100644 --- a/examples/ipfs-private/Cargo.toml +++ b/examples/ipfs-private/Cargo.toml @@ -3,6 +3,7 @@ name = "ipfs-private" version = "0.1.0" edition = "2021" publish = false +license = "MIT" [dependencies] async-std = { version = "1.12", features = ["attributes"] } diff --git a/examples/ping-example/Cargo.toml b/examples/ping-example/Cargo.toml index 93f88700414..9411a89a507 100644 --- a/examples/ping-example/Cargo.toml +++ b/examples/ping-example/Cargo.toml @@ -3,6 +3,7 @@ name = "ping-example" version = "0.1.0" edition = "2021" publish = false +license = "MIT" [dependencies] async-std = { version = "1.12", features = ["attributes"] } diff --git a/examples/rendezvous/Cargo.toml b/examples/rendezvous/Cargo.toml index 9bedabe2734..d34f6de55e3 100644 --- a/examples/rendezvous/Cargo.toml +++ b/examples/rendezvous/Cargo.toml @@ -3,6 +3,7 @@ name = "rendezvous-example" version = "0.1.0" edition = "2021" publish = false +license = "MIT" [dependencies] async-std = { version = "1.12", features = ["attributes"] } From 68d254c27a592ae1e750fa8ee5fa54e8d51a879d Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Wed, 8 Mar 2023 12:52:52 +0100 Subject: [PATCH 8/8] Manually specify resolver --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 12c48f11471..c32c8c42d1b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,3 +48,4 @@ members = [ "transports/webrtc", "interop-tests" ] +resolver = "2"