mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
Use Rust 1.64 workspace inheritance
This commit is contained in:
parent
132b355e1b
commit
65a8c9d6ff
17 changed files with 157 additions and 122 deletions
|
|
@ -16,6 +16,7 @@
|
|||
* Rename request workers to swarm workers
|
||||
* Switch to thin LTO
|
||||
* Use proper workspace path declarations and remove workspace patch section
|
||||
* Use [Rust 1.64 workspace inheritance](https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html)
|
||||
* Reduce space taken by ValidUntil struct from 128 to 32 bits
|
||||
* Use regular (non-amortized) IndexMap for peer and pending scrape response maps (but not for torrent maps)
|
||||
* Improve privilege dropping
|
||||
|
|
|
|||
21
Cargo.toml
21
Cargo.toml
|
|
@ -1,5 +1,4 @@
|
|||
[workspace]
|
||||
|
||||
members = [
|
||||
"aquatic",
|
||||
"aquatic_common",
|
||||
|
|
@ -18,6 +17,26 @@ members = [
|
|||
"aquatic_ws_protocol",
|
||||
]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.2.0"
|
||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
repository = "https://github.com/greatest-ape/aquatic"
|
||||
readme = "./README.md"
|
||||
rust-version = "1.64"
|
||||
|
||||
[workspace.dependencies]
|
||||
aquatic_common = { version = "0.2.0", path = "./aquatic_common" }
|
||||
aquatic_http_protocol = { version = "0.2.0", path = "./aquatic_http_protocol" }
|
||||
aquatic_http = { version = "0.2.0", path = "./aquatic_http" }
|
||||
aquatic_toml_config = { version = "0.2.0", path = "./aquatic_toml_config" }
|
||||
aquatic_toml_config_derive = { version = "0.2.0", path = "./aquatic_toml_config_derive" }
|
||||
aquatic_udp_protocol = { version = "0.2.0", path = "./aquatic_udp_protocol" }
|
||||
aquatic_udp = { version = "0.2.0", path = "./aquatic_udp" }
|
||||
aquatic_ws_protocol = { version = "0.2.0", path = "./aquatic_ws_protocol" }
|
||||
aquatic_ws = { version = "0.2.0", path = "./aquatic_ws" }
|
||||
|
||||
[patch.crates-io]
|
||||
membarrier = { git = "https://github.com/glommer/membarrier-rs.git", branch = "issue-22" }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +1,21 @@
|
|||
[package]
|
||||
name = "aquatic"
|
||||
version = "0.2.0"
|
||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "High-performance open BitTorrent tracker (UDP, HTTP, WebTorrent)"
|
||||
repository = "https://github.com/greatest-ape/aquatic"
|
||||
keywords = ["bittorrent", "torrent", "webtorrent"]
|
||||
readme = "../README.md"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[[bin]]
|
||||
name = "aquatic"
|
||||
|
||||
[dependencies]
|
||||
aquatic_common = { version = "0.2.0", path = "../aquatic_common" }
|
||||
aquatic_http = { version = "0.2.0", path = "../aquatic_http" }
|
||||
aquatic_udp = { version = "0.2.0", path = "../aquatic_udp" }
|
||||
aquatic_ws = { version = "0.2.0", path = "../aquatic_ws" }
|
||||
aquatic_common.workspace = true
|
||||
aquatic_http.workspace = true
|
||||
aquatic_udp.workspace = true
|
||||
aquatic_ws.workspace = true
|
||||
mimalloc = { version = "0.1", default-features = false }
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
[package]
|
||||
name = "aquatic_common"
|
||||
version = "0.2.0"
|
||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "aquatic BitTorrent tracker common code"
|
||||
repository = "https://github.com/greatest-ape/aquatic"
|
||||
readme = "../README.md"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[lib]
|
||||
name = "aquatic_common"
|
||||
|
|
@ -15,7 +16,7 @@ name = "aquatic_common"
|
|||
rustls = ["dep:rustls", "rustls-pemfile"]
|
||||
|
||||
[dependencies]
|
||||
aquatic_toml_config = { version = "0.2.0", path = "../aquatic_toml_config" }
|
||||
aquatic_toml_config.workspace = true
|
||||
|
||||
ahash = "0.8"
|
||||
anyhow = "1"
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
[package]
|
||||
name = "aquatic_http"
|
||||
version = "0.2.0"
|
||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "High-performance open BitTorrent tracker (HTTP over TLS)"
|
||||
repository = "https://github.com/greatest-ape/aquatic"
|
||||
keywords = ["http", "server", "peer-to-peer", "torrent", "bittorrent"]
|
||||
readme = "../README.md"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[lib]
|
||||
name = "aquatic_http"
|
||||
|
|
@ -16,9 +17,9 @@ name = "aquatic_http"
|
|||
name = "aquatic_http"
|
||||
|
||||
[dependencies]
|
||||
aquatic_common = { version = "0.2.0", path = "../aquatic_common", features = ["rustls", "glommio"] }
|
||||
aquatic_http_protocol = { version = "0.2.0", path = "../aquatic_http_protocol" }
|
||||
aquatic_toml_config = { version = "0.2.0", path = "../aquatic_toml_config" }
|
||||
aquatic_common = { workspace = true, features = ["rustls", "glommio"] }
|
||||
aquatic_http_protocol.workspace = true
|
||||
aquatic_toml_config.workspace = true
|
||||
|
||||
anyhow = "1"
|
||||
cfg-if = "1"
|
||||
|
|
|
|||
|
|
@ -1,21 +1,22 @@
|
|||
[package]
|
||||
name = "aquatic_http_load_test"
|
||||
version = "0.2.0"
|
||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "BitTorrent (HTTP over TLS) load tester"
|
||||
repository = "https://github.com/greatest-ape/aquatic"
|
||||
keywords = ["http", "benchmark", "peer-to-peer", "torrent", "bittorrent"]
|
||||
readme = "../README.md"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[[bin]]
|
||||
name = "aquatic_http_load_test"
|
||||
|
||||
[dependencies]
|
||||
aquatic_common = { version = "0.2.0", path = "../aquatic_common", features = ["glommio"] }
|
||||
aquatic_http_protocol = { version = "0.2.0", path = "../aquatic_http_protocol" }
|
||||
aquatic_toml_config = { version = "0.2.0", path = "../aquatic_toml_config" }
|
||||
aquatic_common = { workspace = true, features = ["glommio"] }
|
||||
aquatic_http_protocol.workspace = true
|
||||
aquatic_toml_config.workspace = true
|
||||
|
||||
anyhow = "1"
|
||||
futures-lite = "1"
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
[package]
|
||||
name = "aquatic_http_private"
|
||||
version = "0.2.0"
|
||||
edition = "2021"
|
||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||
license = "Apache-2.0"
|
||||
repository = "https://github.com/greatest-ape/aquatic"
|
||||
keywords = ["http", "benchmark", "peer-to-peer", "torrent", "bittorrent"]
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[lib]
|
||||
name = "aquatic_http_private"
|
||||
|
|
@ -14,9 +16,9 @@ name = "aquatic_http_private"
|
|||
name = "aquatic_http_private"
|
||||
|
||||
[dependencies]
|
||||
aquatic_common = { version = "0.2.0", path = "../aquatic_common", features = ["rustls"] }
|
||||
aquatic_http_protocol = { version = "0.2.0", path = "../aquatic_http_protocol", features = ["axum"] }
|
||||
aquatic_toml_config = { version = "0.2.0", path = "../aquatic_toml_config" }
|
||||
aquatic_common = { workspace = true, features = ["rustls"] }
|
||||
aquatic_http_protocol = { workspace = true, features = ["axum"] }
|
||||
aquatic_toml_config.workspace = true
|
||||
|
||||
anyhow = "1"
|
||||
axum = { version = "0.5", default-features = false, features = ["headers", "http1", "matched-path", "original-uri"] }
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
[package]
|
||||
name = "aquatic_http_protocol"
|
||||
version = "0.2.0"
|
||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
repository = "https://github.com/greatest-ape/aquatic"
|
||||
description = "HTTP BitTorrent tracker protocol"
|
||||
keywords = ["http", "protocol", "peer-to-peer", "torrent", "bittorrent"]
|
||||
readme = "../README.md"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[lib]
|
||||
name = "aquatic_http_protocol"
|
||||
|
|
|
|||
|
|
@ -1,20 +1,21 @@
|
|||
[package]
|
||||
name = "aquatic_toml_config"
|
||||
version = "0.2.0"
|
||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "Serialize toml with comments"
|
||||
repository = "https://github.com/greatest-ape/aquatic"
|
||||
keywords = ["toml"]
|
||||
readme = "../README.md"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[lib]
|
||||
name = "aquatic_toml_config"
|
||||
|
||||
[dependencies]
|
||||
toml = "0.5"
|
||||
aquatic_toml_config_derive = { version = "0.2.0", path = "../aquatic_toml_config_derive" }
|
||||
aquatic_toml_config_derive.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
[package]
|
||||
name = "aquatic_toml_config_derive"
|
||||
version = "0.2.0"
|
||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "Serialize toml with comments"
|
||||
repository = "https://github.com/greatest-ape/aquatic"
|
||||
exclude = ["target"]
|
||||
keywords = ["toml"]
|
||||
readme = "../README.md"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
[package]
|
||||
name = "aquatic_udp"
|
||||
version = "0.2.0"
|
||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "High-performance open UDP BitTorrent tracker"
|
||||
repository = "https://github.com/greatest-ape/aquatic"
|
||||
keywords = ["udp", "server", "peer-to-peer", "torrent", "bittorrent"]
|
||||
readme = "../README.md"
|
||||
rust-version = "1.62"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[lib]
|
||||
name = "aquatic_udp"
|
||||
|
|
@ -20,9 +20,9 @@ name = "aquatic_udp"
|
|||
cpu-pinning = ["aquatic_common/hwloc"]
|
||||
|
||||
[dependencies]
|
||||
aquatic_common = { version = "0.2.0", path = "../aquatic_common" }
|
||||
aquatic_toml_config = { version = "0.2.0", path = "../aquatic_toml_config" }
|
||||
aquatic_udp_protocol = { version = "0.2.0", path = "../aquatic_udp_protocol" }
|
||||
aquatic_common.workspace = true
|
||||
aquatic_toml_config.workspace = true
|
||||
aquatic_udp_protocol.workspace = true
|
||||
|
||||
anyhow = "1"
|
||||
blake3 = "1"
|
||||
|
|
|
|||
|
|
@ -1,20 +1,21 @@
|
|||
[package]
|
||||
name = "aquatic_udp_bench"
|
||||
version = "0.2.0"
|
||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
repository = "https://github.com/greatest-ape/aquatic"
|
||||
readme = "../README.md"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[[bin]]
|
||||
name = "aquatic_udp_bench"
|
||||
|
||||
[dependencies]
|
||||
aquatic_common = { version = "0.2.0", path = "../aquatic_common" }
|
||||
aquatic_toml_config = { version = "0.2.0", path = "../aquatic_toml_config" }
|
||||
aquatic_udp = { version = "0.2.0", path = "../aquatic_udp" }
|
||||
aquatic_udp_protocol = { version = "0.2.0", path = "../aquatic_udp_protocol" }
|
||||
aquatic_common.workspace = true
|
||||
aquatic_toml_config.workspace = true
|
||||
aquatic_udp.workspace = true
|
||||
aquatic_udp_protocol.workspace = true
|
||||
|
||||
anyhow = "1"
|
||||
crossbeam-channel = "0.5"
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
[package]
|
||||
name = "aquatic_udp_load_test"
|
||||
version = "0.2.0"
|
||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "BitTorrent (UDP) load tester"
|
||||
repository = "https://github.com/greatest-ape/aquatic"
|
||||
keywords = ["udp", "benchmark", "peer-to-peer", "torrent", "bittorrent"]
|
||||
readme = "../README.md"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[features]
|
||||
cpu-pinning = ["aquatic_common/hwloc"]
|
||||
|
|
@ -16,9 +17,9 @@ cpu-pinning = ["aquatic_common/hwloc"]
|
|||
name = "aquatic_udp_load_test"
|
||||
|
||||
[dependencies]
|
||||
aquatic_common = { version = "0.2.0", path = "../aquatic_common" }
|
||||
aquatic_toml_config = { version = "0.2.0", path = "../aquatic_toml_config" }
|
||||
aquatic_udp_protocol = { version = "0.2.0", path = "../aquatic_udp_protocol" }
|
||||
aquatic_common.workspace = true
|
||||
aquatic_toml_config.workspace = true
|
||||
aquatic_udp_protocol.workspace = true
|
||||
|
||||
anyhow = "1"
|
||||
hashbrown = "0.12"
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
[package]
|
||||
name = "aquatic_udp_protocol"
|
||||
version = "0.2.0"
|
||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "UDP BitTorrent tracker protocol"
|
||||
repository = "https://github.com/greatest-ape/aquatic"
|
||||
keywords = ["udp", "protocol", "peer-to-peer", "torrent", "bittorrent"]
|
||||
readme = "../README.md"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
byteorder = "1"
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
[package]
|
||||
name = "aquatic_ws"
|
||||
version = "0.2.0"
|
||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "High-performance open WebTorrent tracker"
|
||||
repository = "https://github.com/greatest-ape/aquatic"
|
||||
keywords = ["webtorrent", "websocket", "peer-to-peer", "torrent", "bittorrent"]
|
||||
readme = "../README.md"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[lib]
|
||||
name = "aquatic_ws"
|
||||
|
|
@ -16,9 +17,9 @@ name = "aquatic_ws"
|
|||
name = "aquatic_ws"
|
||||
|
||||
[dependencies]
|
||||
aquatic_common = { version = "0.2.0", path = "../aquatic_common", features = ["rustls", "glommio"] }
|
||||
aquatic_toml_config = { version = "0.2.0", path = "../aquatic_toml_config" }
|
||||
aquatic_ws_protocol = { version = "0.2.0", path = "../aquatic_ws_protocol" }
|
||||
aquatic_common = { workspace = true, features = ["rustls", "glommio"] }
|
||||
aquatic_toml_config.workspace = true
|
||||
aquatic_ws_protocol.workspace = true
|
||||
|
||||
anyhow = "1"
|
||||
async-tungstenite = "0.17"
|
||||
|
|
|
|||
|
|
@ -1,21 +1,22 @@
|
|||
[package]
|
||||
name = "aquatic_ws_load_test"
|
||||
version = "0.2.0"
|
||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "WebTorrent over TLS load tester"
|
||||
repository = "https://github.com/greatest-ape/aquatic"
|
||||
keywords = ["webtorrent", "websocket", "benchmark", "torrent", "bittorrent"]
|
||||
readme = "../README.md"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[[bin]]
|
||||
name = "aquatic_ws_load_test"
|
||||
|
||||
[dependencies]
|
||||
aquatic_common = { version = "0.2.0", path = "../aquatic_common", features = ["glommio"] }
|
||||
aquatic_toml_config = { version = "0.2.0", path = "../aquatic_toml_config" }
|
||||
aquatic_ws_protocol = { version = "0.2.0", path = "../aquatic_ws_protocol" }
|
||||
aquatic_common = { workspace = true, features = ["glommio"] }
|
||||
aquatic_toml_config.workspace = true
|
||||
aquatic_ws_protocol.workspace = true
|
||||
|
||||
anyhow = "1"
|
||||
async-tungstenite = "0.17"
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
[package]
|
||||
name = "aquatic_ws_protocol"
|
||||
version = "0.2.0"
|
||||
authors = ["Joakim Frostegård <joakim.frostegard@gmail.com>"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
description = "WebTorrent tracker protocol"
|
||||
repository = "https://github.com/greatest-ape/aquatic"
|
||||
exclude = ["target"]
|
||||
keywords = ["webtorrent", "protocol", "peer-to-peer", "torrent", "bittorrent"]
|
||||
readme = "../README.md"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[lib]
|
||||
name = "aquatic_ws_protocol"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue