-
Notifications
You must be signed in to change notification settings - Fork 984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*: Move libp2p
meta crate into its own directory
#3012
Closed
Closed
Changes from 3 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
23768b8
More `libp2p` meta crate into its own directory
thomaseizinger e35f2b0
Merge branch 'master' into meta-crate-directory
thomaseizinger ebc4d7b
Only compile `libp2p` crate for wasm
thomaseizinger 76f83dd
Rename meta crate dir to `libp2p`
thomaseizinger 8198c1c
Fix links in `README.md`
thomaseizinger 2da0afa
Split main changelog
thomaseizinger e51e639
Fix changelog formatting
thomaseizinger f197b7f
Fix links in changelog
thomaseizinger cbcd75a
Merge branch 'master' into meta-crate-directory
thomaseizinger 686c717
Rename directories to full crate name
thomaseizinger 8c7ae53
Merge branch 'master' into meta-crate-directory
thomaseizinger a3bf3de
Merge branch 'master' into meta-crate-directory
thomaseizinger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,148 +1,6 @@ | ||
[package] | ||
name = "libp2p" | ||
edition = "2021" | ||
rust-version = "1.60.0" | ||
description = "Peer-to-peer networking library" | ||
version = "0.49.0" | ||
authors = ["Parity Technologies <[email protected]>"] | ||
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", | ||
"dns-async-std", | ||
"dns-tokio", | ||
"ecdsa", | ||
"floodsub", | ||
"gossipsub", | ||
"identify", | ||
"kad", | ||
"mdns", | ||
"mdns-async-io", | ||
"mdns-tokio", | ||
"metrics", | ||
"mplex", | ||
"noise", | ||
"ping", | ||
"plaintext", | ||
"pnet", | ||
"relay", | ||
"rendezvous", | ||
"request-response", | ||
"rsa", | ||
"secp256k1", | ||
"serde", | ||
"tcp", | ||
"tcp-async-io", | ||
"tcp-tokio", | ||
"tokio", | ||
"uds", | ||
"wasm-bindgen", | ||
"wasm-ext", | ||
"wasm-ext-websocket", | ||
"websocket", | ||
"yamux", | ||
] | ||
autonat = ["dep:libp2p-autonat"] | ||
dcutr = ["dep:libp2p-dcutr", "libp2p-metrics?/dcutr"] | ||
deflate = ["dep:libp2p-deflate"] | ||
dns = ["dep:libp2p-dns"] | ||
dns-async-std = ["dep:libp2p-dns", "libp2p-dns?/async-std"] | ||
dns-tokio = ["dep:libp2p-dns", "libp2p-dns?/tokio"] | ||
floodsub = ["dep:libp2p-floodsub"] | ||
identify = ["dep:libp2p-identify", "libp2p-metrics?/identify"] | ||
kad = ["dep:libp2p-kad", "libp2p-metrics?/kad"] | ||
gossipsub = ["dep:libp2p-gossipsub", "libp2p-metrics?/gossipsub"] | ||
metrics = ["dep:libp2p-metrics"] | ||
mdns = ["dep:libp2p-mdns"] | ||
mdns-async-io = ["dep:libp2p-mdns", "libp2p-mdns?/async-io"] | ||
mdns-tokio = ["dep:libp2p-mdns", "libp2p-mdns?/tokio"] | ||
mplex = ["dep:libp2p-mplex"] | ||
noise = ["dep:libp2p-noise"] | ||
ping = ["dep:libp2p-ping", "libp2p-metrics?/ping"] | ||
plaintext = ["dep:libp2p-plaintext"] | ||
pnet = ["dep:libp2p-pnet"] | ||
relay = ["dep:libp2p-relay", "libp2p-metrics?/relay"] | ||
request-response = ["dep:libp2p-request-response"] | ||
rendezvous = ["dep:libp2p-rendezvous"] | ||
tcp = ["dep:libp2p-tcp"] | ||
tcp-async-io = ["dep:libp2p-tcp", "libp2p-tcp?/async-io"] | ||
tcp-tokio = ["dep:libp2p-tcp", "libp2p-tcp?/tokio"] | ||
uds = ["dep:libp2p-uds"] | ||
wasm-bindgen = ["futures-timer/wasm-bindgen", "instant/wasm-bindgen", "getrandom/js"] | ||
wasm-ext = ["dep:libp2p-wasm-ext"] | ||
wasm-ext-websocket = ["wasm-ext", "libp2p-wasm-ext?/websocket"] | ||
websocket = ["dep:libp2p-websocket"] | ||
yamux = ["dep:libp2p-yamux"] | ||
secp256k1 = ["libp2p-core/secp256k1"] | ||
rsa = ["libp2p-core/rsa"] | ||
ecdsa = ["libp2p-core/ecdsa"] | ||
serde = ["libp2p-core/serde", "libp2p-kad?/serde", "libp2p-gossipsub?/serde"] | ||
tokio = ["libp2p-mdns?/tokio", "libp2p-tcp?/tokio", "libp2p-dns?/tokio"] | ||
async-std = ["libp2p-mdns?/async-io", "libp2p-tcp?/async-io", "libp2p-dns?/async-std"] | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
|
||
[dependencies] | ||
bytes = "1" | ||
futures = "0.3.1" | ||
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 | ||
lazy_static = "1.2" | ||
|
||
libp2p-autonat = { version = "0.8.0", path = "protocols/autonat", optional = true } | ||
libp2p-core = { version = "0.37.0", path = "core" } | ||
libp2p-dcutr = { version = "0.7.0", path = "protocols/dcutr", optional = true } | ||
libp2p-floodsub = { version = "0.40.1", path = "protocols/floodsub", optional = true } | ||
libp2p-identify = { version = "0.40.0", path = "protocols/identify", optional = true } | ||
libp2p-kad = { version = "0.41.0", path = "protocols/kad", optional = true } | ||
libp2p-metrics = { version = "0.10.0", path = "misc/metrics", optional = true } | ||
libp2p-mplex = { version = "0.37.0", path = "muxers/mplex", optional = true } | ||
libp2p-noise = { version = "0.40.0", path = "transports/noise", optional = true } | ||
libp2p-ping = { version = "0.40.1", path = "protocols/ping", optional = true } | ||
libp2p-plaintext = { version = "0.37.0", path = "transports/plaintext", optional = true } | ||
libp2p-pnet = { version = "0.22.1", path = "transports/pnet", optional = true } | ||
libp2p-relay = { version = "0.13.0", path = "protocols/relay", optional = true } | ||
libp2p-rendezvous = { version = "0.10.0", path = "protocols/rendezvous", optional = true } | ||
libp2p-request-response = { version = "0.22.1", path = "protocols/request-response", optional = true } | ||
libp2p-swarm = { version = "0.40.1", path = "swarm" } | ||
libp2p-swarm-derive = { version = "0.30.1", path = "swarm-derive" } | ||
libp2p-uds = { version = "0.36.0", path = "transports/uds", optional = true } | ||
libp2p-wasm-ext = { version = "0.37.0", path = "transports/wasm-ext", optional = true } | ||
libp2p-yamux = { version = "0.41.0", path = "muxers/yamux", optional = true } | ||
multiaddr = { version = "0.14.0" } | ||
parking_lot = "0.12.0" | ||
pin-project = "1.0.0" | ||
smallvec = "1.6.1" | ||
|
||
[target.'cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))'.dependencies] | ||
libp2p-deflate = { version = "0.37.0", path = "transports/deflate", optional = true } | ||
libp2p-dns = { version = "0.37.0", path = "transports/dns", optional = true } | ||
libp2p-mdns = { version = "0.41.0", path = "protocols/mdns", optional = true } | ||
libp2p-tcp = { version = "0.37.0", path = "transports/tcp", optional = true } | ||
libp2p-websocket = { version = "0.39.0", path = "transports/websocket", optional = true } | ||
|
||
[target.'cfg(not(target_os = "unknown"))'.dependencies] | ||
libp2p-gossipsub = { version = "0.42.1", path = "protocols/gossipsub", optional = true } | ||
|
||
[dev-dependencies] | ||
async-std = { version = "1.6.2", features = ["attributes"] } | ||
async-trait = "0.1" | ||
env_logger = "0.9.0" | ||
clap = { version = "4.0.13", features = ["derive"] } | ||
tokio = { version = "1.15", features = ["io-util", "io-std", "macros", "rt", "rt-multi-thread"] } | ||
|
||
[workspace] | ||
members = [ | ||
"meta", | ||
"core", | ||
"misc/metrics", | ||
"misc/multistream-select", | ||
|
@@ -175,39 +33,3 @@ members = [ | |
"transports/websocket", | ||
"transports/wasm-ext" | ||
] | ||
|
||
[[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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
[package] | ||
name = "libp2p" | ||
edition = "2021" | ||
rust-version = "1.60.0" | ||
description = "Peer-to-peer networking library" | ||
version = "0.49.0" | ||
authors = ["Parity Technologies <[email protected]>"] | ||
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", | ||
"dns-async-std", | ||
"dns-tokio", | ||
"ecdsa", | ||
"floodsub", | ||
"gossipsub", | ||
"identify", | ||
"kad", | ||
"mdns", | ||
"mdns-async-io", | ||
"mdns-tokio", | ||
"metrics", | ||
"mplex", | ||
"noise", | ||
"ping", | ||
"plaintext", | ||
"pnet", | ||
"relay", | ||
"rendezvous", | ||
"request-response", | ||
"rsa", | ||
"secp256k1", | ||
"serde", | ||
"tcp", | ||
"tcp-async-io", | ||
"tcp-tokio", | ||
"tokio", | ||
"uds", | ||
"wasm-bindgen", | ||
"wasm-ext", | ||
"wasm-ext-websocket", | ||
"websocket", | ||
"yamux", | ||
] | ||
autonat = ["dep:libp2p-autonat"] | ||
dcutr = ["dep:libp2p-dcutr", "libp2p-metrics?/dcutr"] | ||
deflate = ["dep:libp2p-deflate"] | ||
dns = ["dep:libp2p-dns"] | ||
dns-async-std = ["dep:libp2p-dns", "libp2p-dns?/async-std"] | ||
dns-tokio = ["dep:libp2p-dns", "libp2p-dns?/tokio"] | ||
floodsub = ["dep:libp2p-floodsub"] | ||
identify = ["dep:libp2p-identify", "libp2p-metrics?/identify"] | ||
kad = ["dep:libp2p-kad", "libp2p-metrics?/kad"] | ||
gossipsub = ["dep:libp2p-gossipsub", "libp2p-metrics?/gossipsub"] | ||
metrics = ["dep:libp2p-metrics"] | ||
mdns = ["dep:libp2p-mdns"] | ||
mdns-async-io = ["dep:libp2p-mdns", "libp2p-mdns?/async-io"] | ||
mdns-tokio = ["dep:libp2p-mdns", "libp2p-mdns?/tokio"] | ||
mplex = ["dep:libp2p-mplex"] | ||
noise = ["dep:libp2p-noise"] | ||
ping = ["dep:libp2p-ping", "libp2p-metrics?/ping"] | ||
plaintext = ["dep:libp2p-plaintext"] | ||
pnet = ["dep:libp2p-pnet"] | ||
relay = ["dep:libp2p-relay", "libp2p-metrics?/relay"] | ||
request-response = ["dep:libp2p-request-response"] | ||
rendezvous = ["dep:libp2p-rendezvous"] | ||
tcp = ["dep:libp2p-tcp"] | ||
tcp-async-io = ["dep:libp2p-tcp", "libp2p-tcp?/async-io"] | ||
tcp-tokio = ["dep:libp2p-tcp", "libp2p-tcp?/tokio"] | ||
uds = ["dep:libp2p-uds"] | ||
wasm-bindgen = ["futures-timer/wasm-bindgen", "instant/wasm-bindgen", "getrandom/js"] | ||
wasm-ext = ["dep:libp2p-wasm-ext"] | ||
wasm-ext-websocket = ["wasm-ext", "libp2p-wasm-ext?/websocket"] | ||
websocket = ["dep:libp2p-websocket"] | ||
yamux = ["dep:libp2p-yamux"] | ||
secp256k1 = ["libp2p-core/secp256k1"] | ||
rsa = ["libp2p-core/rsa"] | ||
ecdsa = ["libp2p-core/ecdsa"] | ||
serde = ["libp2p-core/serde", "libp2p-kad?/serde", "libp2p-gossipsub?/serde"] | ||
tokio = ["libp2p-mdns?/tokio", "libp2p-tcp?/tokio", "libp2p-dns?/tokio"] | ||
async-std = ["libp2p-mdns?/async-io", "libp2p-tcp?/async-io", "libp2p-dns?/async-std"] | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
|
||
[dependencies] | ||
bytes = "1" | ||
futures = "0.3.1" | ||
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 | ||
lazy_static = "1.2" | ||
|
||
libp2p-autonat = { version = "0.8.0", path = "../protocols/autonat", optional = true } | ||
libp2p-core = { version = "0.37.0", path = "../core" } | ||
libp2p-dcutr = { version = "0.7.0", path = "../protocols/dcutr", optional = true } | ||
libp2p-floodsub = { version = "0.40.1", path = "../protocols/floodsub", optional = true } | ||
libp2p-identify = { version = "0.40.0", path = "../protocols/identify", optional = true } | ||
libp2p-kad = { version = "0.41.0", path = "../protocols/kad", optional = true } | ||
libp2p-metrics = { version = "0.10.0", path = "../misc/metrics", optional = true } | ||
libp2p-mplex = { version = "0.37.0", path = "../muxers/mplex", optional = true } | ||
libp2p-noise = { version = "0.40.0", path = "../transports/noise", optional = true } | ||
libp2p-ping = { version = "0.40.1", path = "../protocols/ping", optional = true } | ||
libp2p-plaintext = { version = "0.37.0", path = "../transports/plaintext", optional = true } | ||
libp2p-pnet = { version = "0.22.1", path = "../transports/pnet", optional = true } | ||
libp2p-relay = { version = "0.13.0", path = "../protocols/relay", optional = true } | ||
libp2p-rendezvous = { version = "0.10.0", path = "../protocols/rendezvous", optional = true } | ||
libp2p-request-response = { version = "0.22.1", path = "../protocols/request-response", optional = true } | ||
libp2p-swarm = { version = "0.40.1", path = "../swarm" } | ||
libp2p-swarm-derive = { version = "0.30.1", path = "../swarm-derive" } | ||
libp2p-uds = { version = "0.36.0", path = "../transports/uds", optional = true } | ||
libp2p-wasm-ext = { version = "0.37.0", path = "../transports/wasm-ext", optional = true } | ||
libp2p-yamux = { version = "0.41.0", path = "../muxers/yamux", optional = true } | ||
multiaddr = { version = "0.14.0" } | ||
parking_lot = "0.12.0" | ||
pin-project = "1.0.0" | ||
smallvec = "1.6.1" | ||
|
||
[target.'cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))'.dependencies] | ||
libp2p-deflate = { version = "0.37.0", path = "../transports/deflate", optional = true } | ||
libp2p-dns = { version = "0.37.0", path = "../transports/dns", optional = true } | ||
libp2p-mdns = { version = "0.41.0", path = "../protocols/mdns", optional = true } | ||
libp2p-tcp = { version = "0.37.0", path = "../transports/tcp", optional = true } | ||
libp2p-websocket = { version = "0.39.0", path = "../transports/websocket", optional = true } | ||
|
||
[target.'cfg(not(target_os = "unknown"))'.dependencies] | ||
libp2p-gossipsub = { version = "0.42.1", path = "../protocols/gossipsub", optional = true } | ||
|
||
[dev-dependencies] | ||
async-std = { version = "1.6.2", features = ["attributes"] } | ||
async-trait = "0.1" | ||
env_logger = "0.9.0" | ||
clap = { version = "4.0.13", features = ["derive"] } | ||
tokio = { version = "1.15", features = ["io-util", "io-std", "macros", "rt", "rt-multi-thread"] } | ||
|
||
[[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"] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it not make sense to name the folder like the crate name? Tokio seems to do just that. What do other projects do?
https://github.com/tokio-rs/tokio/tree/master/tokio
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you rename all the other directories to their actual crate name too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be a bit of repetition but I think I'd prefer just straight up using the crate name for all directories.
The directory hierarchy is also something I am not too sure about but that is orthogonal :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that each of them are sub-crates of
libp2p
, I think it is fine to keep them as is.