[package]
edition = "2024"
name = "dht-crawler"
version = "0.1.1"
authors = ["桥下红药 <1121744186@qq.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "高性能的 Rust DHT (Distributed Hash Table) 爬虫库 | A high-performance Rust DHT crawler library for fetching torrent information from the BitTorrent DHT network"
documentation = "https://docs.rs/dht-crawler"
readme = "README.md"
keywords = [
"dht",
"bittorrent",
"crawler",
"p2p",
"torrent",
]
categories = [
"network-programming",
"asynchronous",
]
license = "MIT"
repository = "https://github.com/0xddy/dht-crawler"
[features]
default = []
metrics = ["dep:metrics"]
mimalloc = []
[lib]
name = "dht_crawler"
path = "src/lib.rs"
[[example]]
name = "dht_crawler_example"
path = "examples/main.rs"
[dependencies.ahash]
version = "0.8"
[dependencies.bloomfilter]
version = "1.0"
[dependencies.bytes]
version = "1.0"
[dependencies.hex]
version = "0.4"
[dependencies.log]
version = "0.4"
[dependencies.metrics]
version = "0.24"
optional = true
[dependencies.rand]
version = "0.8"
[dependencies.rbit]
version = "0.2"
[dependencies.serde]
version = "1.0"
features = ["derive"]
[dependencies.serde_bencode]
version = "0.2"
[dependencies.serde_bytes]
version = "0.11.19"
[dependencies.sha1]
version = "0.10"
[dependencies.socket2]
version = "0.5"
features = ["all"]
[dependencies.thiserror]
version = "1.0"
[dependencies.tokio]
version = "1.35"
features = [
"rt",
"rt-multi-thread",
"net",
"sync",
"time",
"macros",
]
[dependencies.tokio-util]
version = "0.7"
[dev-dependencies.metrics-exporter-prometheus]
version = "0.18"
features = ["http-listener"]
default-features = false
[dev-dependencies.mimalloc]
version = "0.1"
[dev-dependencies.tracing]
version = "0.1"
[dev-dependencies.tracing-subscriber]
version = "0.3"
features = [
"env-filter",
"fmt",
"tracing-log",
]
[profile.dev]
opt-level = 0
debug = 2
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
panic = "abort"
strip = true