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

#170 in Encoding

Download history 1972/week @ 2024-07-23 2944/week @ 2024-07-30 2530/week @ 2024-08-06 3111/week @ 2024-08-13 2268/week @ 2024-08-20 2162/week @ 2024-08-27 2627/week @ 2024-09-03 2279/week @ 2024-09-10 1680/week @ 2024-09-17 2321/week @ 2024-09-24 3247/week @ 2024-10-01 1671/week @ 2024-10-08 2736/week @ 2024-10-15 3130/week @ 2024-10-22 3492/week @ 2024-10-29 3441/week @ 2024-11-05

13,124 downloads per month
Used in 26 crates (18 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

~140–375KB