| Crates.io | hightorrent |
| lib.rs | hightorrent |
| version | 0.3.2 |
| created_at | 2022-12-22 17:02:45.117731+00 |
| updated_at | 2025-08-29 09:23:46.232391+00 |
| description | High-level torrent library which supports Bittorrent v1, v2 and hybrid torrents |
| homepage | |
| repository | https://github.com/angrynode/hightorrent |
| max_upload_size | |
| id | 744025 |
| size | 641,833 |
HighTorrent is a library which contains high-level data structures and functions to interact with Bittorrent v1 and v2 torrents. HighTorrent does not aim to be featureful, but rather to be super easy to use and interoperate with more advanced torrent software, and completely impossible to misuse.
Note that HighTorrent is not a networked library. It will not provide any utilities for querying the DHT and/or downloading torrents. HighTorrent is much lower in the stack.
HighTorrent provides utilities to extract name and hash from torrents/magnets, using the
MagnetLink and TorrentFile structures, but could provide more advanced utilities in the future (PRs welcome). Additionally, it provides the Torrent struct and the
ToTorrent trait representing fully-loaded torrents ; those helpers are intended to be used by more diverse torrenting libraries to provide interoperability out-of-the-box.
Finally, the SingleTarget and
MultiTarget structures represent one or more torrents you wish to
interact with. The contained stringy value is ambiguous, and can represent either a precise
InfoHash or a libtorrent-compatible TorrentID (truncated hash).
Do you know other related Rust projects? Please let us know.
This library was developed as part of the TorrentManager project, because there was no high-level library to read magnet links and torrent files that would support Bittorrent v2 torrents. New features will be added as they are required by the larger project, but suggestions are welcome if this library can benefit other people and projects as well.
Contributions are welcome. Here are the steps to make sure your contribution gets merged:
just check; it's running more steps than just cargo testcargo rdme to update the READMEIf you don't have those dependencies (just, cargo-rdme), you can setup a temporary development environment with Nix by running nix develop.
From the repository root, run cargo test. To run advanced tests using rust nightly as used in CI, run scripts/pre-commit.sh. To run the test verifying that error cases from libtorrent are properly handled (which is normally ignored), run cargo test -- --ignored.
GNU AGPL v3