How bhaskar10h/rustor works
Project type and purpose
• This is a Rust-based BitTorrent client/library. It reads “.torrent” files or magnet URIs, parses them using Bencode, contacts trackers over UDP (and optionally HTTP), manages a peer list, and orchestrates peer‐to‐peer exchanges.
File structure
• Top-level
• Cargo.toml / Cargo.lock: Rust project manifest
• .github/workflows/rust.yml: CI build/test pipeline
• src/
• main.rs: CLI entrypoint
• bittorent.rs: core engine (state machine, high-level orchestration)
• Bencode/ (encode.rs, decode.rs): bencode parser/serializer
• Torrentfile/ (torrent.rs, magnet.rs): domain models for torrent metadata & magnet links
• Tracker/ (tracker.rs, udp.rs): tracker client implementations (UDP announce, HTTP announce if added)
• Peers/ (peer.rs): peer connection management
README
• (Empty in this case, so we inferred purpose from file names and conventions.)