Skip to content
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

Pre-Refactor for Project #52

Merged
merged 6 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[env]

[build]
rustflags = [
"-D",
Expand All @@ -17,3 +19,7 @@ rustflags = [
"-D",
"unused",
]

[term]
quiet = false
verbose = true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# Generated by Cargo
target/
Cargo.lock
rustc-ice*

# Generated by Rustfmt
*.bk
Expand Down
15 changes: 14 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
"[rust]": {
"editor.formatOnSave": true
},
"[ignore]": {
"rust-analyzer.cargo.extraEnv": {
"RUSTFLAGS": "-Z profile -C codegen-units=1 -C inline-threshold=0 -C link-dead-code -C overflow-checks=off -C panic=abort -Z panic_abort_tests",
"RUSTDOCFLAGS": "-Z profile -C codegen-units=1 -C inline-threshold=0 -C link-dead-code -C overflow-checks=off -C panic=abort -Z panic_abort_tests",
"CARGO_INCREMENTAL": "0",
"RUST_BACKTRACE": "1"
}
},
"rust-analyzer.checkOnSave": true,
"rust-analyzer.check.command": "clippy",
"rust-analyzer.check.allTargets": true,
Expand All @@ -19,5 +27,10 @@
"clippy::style",
"-W",
"clippy::pedantic"
]
],
"evenBetterToml.formatter.allowedBlankLines": 1,
"evenBetterToml.formatter.columnWidth": 130,
"evenBetterToml.formatter.trailingNewline": true,
"evenBetterToml.formatter.reorderKeys": true,
"evenBetterToml.formatter.reorderArrays": true,
}
18 changes: 8 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[workspace]
members = [
"examples/get_metadata",
"examples/simple_torrent",
"packages/bencode",
"packages/dht",
"packages/disk",
Expand All @@ -13,33 +15,29 @@ members = [
"packages/util",
"packages/utp",
"packages/utracker",
"examples/get_metadata",
"examples/simple_torrent",
]

resolver = "2"

[workspace.package]
authors = [
"Nautilus Cyberneering <[email protected]>, Andrew <[email protected]>",
]
authors = ["Nautilus Cyberneering <[email protected]>, Andrew <[email protected]>"]
categories = ["network-programming", "web-programming"]
description = "A collection of crates for building applications using bittorrent technologies."
documentation = "https://github.com/torrust/bittorrent-infrastructure-project"
edition = "2021"
homepage = "https://github.com/torrust/bittorrent-infrastructure-project"
keywords = ["bittorrent"]
license = "Apache-2.0"
publish = false # until we decide where to publish.
publish = false # until we decide where to publish.
repository = "https://github.com/torrust/bittorrent-infrastructure-project"
rust-version = "1.71"
version = "1.0.0-alpha.1"

[profile.bench]
opt-level = 3
codegen-units = 1
debug = false
rpath = false
lto = false
debug-assertions = false
codegen-units = 1
lto = false
opt-level = 3
panic = 'unwind'
rpath = false
1 change: 1 addition & 0 deletions cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"subsecond",
"Swatinem",
"taiki",
"thiserror",
"transmissionbt",
"umio",
"unchoke",
Expand Down
8 changes: 4 additions & 4 deletions examples/get_metadata/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "get_metadata"
description = "Examples For bip-rs"
name = "get_metadata"
readme = "README.md"

authors.workspace = true
Expand All @@ -21,7 +21,7 @@ select = { path = "../../packages/select" }

clap = "3"
futures = "0.1"
tokio-core = "0.1"
tokio-codec = "0.1"
pendulum = "0.3"
hex = "0.4"
pendulum = "0.3"
tokio-codec = "0.1"
tokio-core = "0.1"
4 changes: 2 additions & 2 deletions examples/simple_torrent/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "simple_torrent"
description = "Examples For bip-rs"
name = "simple_torrent"
readme = "README.md"

authors.workspace = true
Expand All @@ -22,5 +22,5 @@ peer = { path = "../../packages/peer" }

clap = "3"
futures = "0.1"
tokio-core = "0.1"
tokio-codec = "0.1"
tokio-core = "0.1"
8 changes: 2 additions & 6 deletions packages/bencode/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "bencode"
description = "Efficient decoding and encoding for bencode."
keywords = ["bencode"]
name = "bencode"
readme = "README.md"

authors.workspace = true
Expand All @@ -21,10 +21,6 @@ error-chain = "0.12"
[dev-dependencies]
criterion = "0.5"

[[test]]
name = "test"
path = "test/mod.rs"

[[bench]]
harness = false
name = "bencode_benchmark"
harness = false
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/dht/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dht"
description = "Implementation of the bittorrent mainline DHT"
keywords = ["dht", "distributed", "hash", "mainline", "bittorrent"]
keywords = ["bittorrent", "dht", "distributed", "hash", "mainline"]
name = "dht"
readme = "README.md"

authors.workspace = true
Expand All @@ -20,9 +20,9 @@ bencode = { path = "../bencode" }
handshake = { path = "../handshake" }
util = { path = "../util" }

chrono = "0.4"
crc = "3"
error-chain = "0.12"
log = "0.4"
mio = "0.5"
rand = "0.8"
chrono = "0.4"
error-chain = "0.12"
14 changes: 5 additions & 9 deletions packages/disk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "disk"
description = "Bittorrent Infrastructure Project Disk Module"
keywords = ["filesystem", "fs", "disk"]
keywords = ["disk", "filesystem", "fs"]
name = "disk"
readme = "README.md"

authors.workspace = true
Expand All @@ -21,21 +21,17 @@ util = { path = "../util" }

bytes = "0.4"
crossbeam = "0.8"
error-chain = "0.12"
futures = "0.1"
futures-cpupool = "0.1"
error-chain = "0.12"
log = "0.4"
lru-cache = "0.1"

[dev-dependencies]
criterion = "0.5"
rand = "0.8"
tokio-core = "0.1"
criterion = "0.5"

[[test]]
name = "test"
path = "test/mod.rs"

[[bench]]
harness = false
name = "disk_benchmark"
harness = false
Loading
Loading