Files
dht/Cargo.toml
T

65 lines
1.6 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[package]
name = "dht-crawler"
version = "0.0.4"
edition = "2024"
authors = ["桥下红药 <1121744186@qq.com>"]
description = "高性能的 Rust DHT(分布式哈希表)爬虫库,用于爬取 BitTorrent DHT 网络中的种子信息"
license = "MIT"
documentation = "https://docs.rs/dht-crawler"
keywords = ["dht", "bittorrent", "crawler", "p2p", "torrent"]
categories = ["network-programming", "asynchronous"]
readme = "README.md"
[lib]
name = "dht_crawler"
path = "src/lib.rs"
[dependencies]
tokio = { version = "1.35", features = ["rt", "rt-multi-thread", "net", "sync", "time", "macros"] }
tokio-util = { version = "0.7" }
serde = { version = "1.0", features = ["derive"] }
serde_bencode = "0.2"
sha1 = "0.10"
hex = "0.4"
rand = "0.8"
log = "0.4"
thiserror = "1.0"
socket2 = { version = "0.5", features = ["all"] }
rbit = "0.2"
bytes = "1.0"
bloomfilter = "1.0"
ahash = "0.8"
serde_bytes = "0.11.19"
metrics = { version = "0.24", optional = true }
[dev-dependencies]
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt", "tracing-log"] }
mimalloc = "0.1"
# 禁用默认 features,只启用 http-listener(不包含 hyper-rustls
# 这样可以避免引入 aws-lc-sys
metrics-exporter-prometheus = { version = "0.18", default-features = false, features = ["http-listener"] }
[features]
default = []
metrics = ["dep:metrics"]
mimalloc = []
[[example]]
name = "dht_crawler_example"
path = "examples/main.rs"
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
panic = "abort"
strip = true
[profile.dev]
opt-level = 0
debug = true