#bittorrent #rqbit #bittorrent-client #torrent-client #download #serialization

librqbit

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

21 stable releases (6 major)

8.1.1 Jun 12, 2025
8.0.0 Jan 6, 2025
7.0.1 Aug 28, 2024
6.0.0 Aug 6, 2024
2.2.2 Nov 16, 2023

#2 in #rqbit

Download history 116/week @ 2025-12-16 345/week @ 2025-12-23 294/week @ 2025-12-30 214/week @ 2026-01-06 258/week @ 2026-01-13 313/week @ 2026-01-20 192/week @ 2026-01-27 226/week @ 2026-02-03 301/week @ 2026-02-10 226/week @ 2026-02-17 972/week @ 2026-02-24 871/week @ 2026-03-03 879/week @ 2026-03-10 742/week @ 2026-03-17 765/week @ 2026-03-24 882/week @ 2026-03-31

3,357 downloads per month
Used in 7 crates (6 directly)

Apache-2.0

1MB
24K SLoC

Rust 22K SLoC // 0.0% comments TSX 2K SLoC // 0.0% comments TypeScript 546 SLoC // 0.1% comments JavaScript 12 SLoC

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.


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

Dependencies

~25–77MB
~1M SLoC