9 releases

0.2.4 Oct 9, 2023
0.2.3 Dec 1, 2020
0.2.2 Jul 17, 2020
0.2.1 Feb 10, 2020
0.1.1 Dec 21, 2016

#200 in Encoding

Download history 3303/week @ 2024-11-16 4010/week @ 2024-11-23 5255/week @ 2024-11-30 4836/week @ 2024-12-07 4427/week @ 2024-12-14 2549/week @ 2024-12-21 2464/week @ 2024-12-28 3670/week @ 2025-01-04 4565/week @ 2025-01-11 4820/week @ 2025-01-18 4159/week @ 2025-01-25 5069/week @ 2025-02-01 4362/week @ 2025-02-08 4232/week @ 2025-02-15 3879/week @ 2025-02-22 3154/week @ 2025-03-01

16,815 downloads per month
Used in 29 crates (17 directly)

MIT license

65KB
1.5K SLoC

Serde Bencode

Checking Formatting Testing Benchmarking Coverage Crates.io docs.rs

A Serde backed Bencode encoding/decoding library for Rust.

Installation

Add the following to your Cargo.toml:

[dependencies]
serde_bencode = "^0.2.4"
serde = "^1.0.0"
serde_derive = "^1.0.0"

Usage

This is an abbreviated .torrent parsing example from examples/parse_torrent.rs. If you compile this crate as a binary, it will print metadata for any Torrent sent to stdin.

Benchmarking

cargo bench

Dependencies

~130–355KB