#download #bittorrent #client #rqbit #session #top #backbone

librqbit

The main library used by rqbit torrent client. The binary is just a small wrapper on top of it.

18 stable releases (5 major)

7.0.1 Aug 28, 2024
6.0.0 Aug 6, 2024
5.6.4 Apr 29, 2024
5.5.4 Mar 29, 2024
2.2.2 Nov 16, 2023

#2202 in Network programming

Download history 20/week @ 2024-07-13 25/week @ 2024-07-20 17/week @ 2024-07-27 139/week @ 2024-08-03 38/week @ 2024-08-10 29/week @ 2024-08-17 326/week @ 2024-08-24 86/week @ 2024-08-31 37/week @ 2024-09-07 63/week @ 2024-09-14 105/week @ 2024-09-21 21/week @ 2024-09-28 19/week @ 2024-10-05 30/week @ 2024-10-12 15/week @ 2024-10-19 53/week @ 2024-10-26

120 downloads per month
Used in 2 crates

Apache-2.0

1MB
22K SLoC

Rust 19K SLoC // 0.0% comments TSX 2K SLoC // 0.0% comments TypeScript 538 SLoC // 0.1% comments JavaScript 12 SLoC

librqbit

A fully featured, easy to use torrent downloading library used as a backbone of rqbit.

Basic example

See examples on GitHub.

Documentation

librqbit at docs.rs


lib.rs:

This crate provides everything necessary to download torrents.

Quick usage example

use librqbit::*;

tokio_test::block_on(async {
    let session = Session::new("/tmp/where-to-download".into()).await.unwrap();
    let managed_torrent_handle = session.add_torrent(
       AddTorrent::from_url("magnet:?xt=urn:btih:cab507494d02ebb1178b38f2e9d7be299c86b862"),
       None // options
    ).await.unwrap().into_handle().unwrap();
    managed_torrent_handle.wait_until_completed().await.unwrap();
})

Overview

The main type to start off with is Session.

It also proved useful to use the [Api] when building the rqbit desktop app, as it provides a facade that works with simple serializable types.

Dependencies

~16–53MB
~886K SLoC