torrent 0.1.6

High-level async BitTorrent library — session management, HTTP/UDP tracker communication, DHT networking, peer connections, and file storage. Built on torrent-core with tokio.
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.87"
name = "torrent"
version = "0.1.6"
authors = ["Zheng Junyi <zhengjunyi@live.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "High-level async BitTorrent library — session management, HTTP/UDP tracker communication, DHT networking, peer connections, and file storage. Built on torrent-core with tokio."
readme = "README.md"
keywords = [
    "bittorrent",
    "p2p",
    "torrent",
    "async",
    "tokio",
]
categories = [
    "network-programming",
    "asynchronous",
]
license = "MIT"
repository = "https://github.com/mogeko/torrent-rs"
resolver = "2"

[features]
serde = [
    "torrent-core/serde",
    "dep:serde",
]

[lib]
name = "torrent"
path = "src/lib.rs"

[[example]]
name = "dht_discovery"
path = "examples/dht_discovery.rs"

[[example]]
name = "download_torrent"
path = "examples/download_torrent.rs"

[[example]]
name = "magnet_download"
path = "examples/magnet_download.rs"

[[example]]
name = "parse_metainfo"
path = "examples/parse_metainfo.rs"

[[example]]
name = "peer_connect"
path = "examples/peer_connect.rs"

[[example]]
name = "peer_pair"
path = "examples/peer_pair.rs"

[[example]]
name = "session_manage"
path = "examples/session_manage.rs"

[[example]]
name = "tracker_announce"
path = "examples/tracker_announce.rs"

[[test]]
name = "dht_rpc"
path = "tests/dht_rpc.rs"

[[test]]
name = "peer_stream"
path = "tests/peer_stream.rs"

[[test]]
name = "pex"
path = "tests/pex.rs"

[[test]]
name = "session"
path = "tests/session.rs"

[dependencies.rand]
version = "0.10"

[dependencies.rustls]
version = "0.23"

[dependencies.rustls-native-certs]
version = "0.8"

[dependencies.serde]
version = "1.0"
features = ["derive"]
optional = true

[dependencies.sha1]
version = "0.11"

[dependencies.tokio]
version = "1.52"
features = [
    "net",
    "rt",
    "macros",
    "time",
    "io-util",
    "fs",
    "sync",
]

[dependencies.tokio-rustls]
version = "0.26"

[dependencies.torrent-core]
version = "=0.1.6"

[dependencies.tracing]
version = "0.1"

[dependencies.url]
version = "2.5"

[dev-dependencies.serde_json]
version = "1.0"

[dev-dependencies.tempfile]
version = "3.27"

[dev-dependencies.tracing-subscriber]
version = "0.3"
features = ["env-filter"]