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

#168 in Encoding

Download history 2463/week @ 2024-08-04 3150/week @ 2024-08-11 2498/week @ 2024-08-18 1980/week @ 2024-08-25 2887/week @ 2024-09-01 1946/week @ 2024-09-08 1853/week @ 2024-09-15 2021/week @ 2024-09-22 3336/week @ 2024-09-29 2017/week @ 2024-10-06 2532/week @ 2024-10-13 2985/week @ 2024-10-20 3070/week @ 2024-10-27 4158/week @ 2024-11-03 3567/week @ 2024-11-10 3216/week @ 2024-11-17

14,442 downloads per month
Used in 25 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

~135–360KB