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

#182 in Encoding

Download history 1949/week @ 2024-09-20 3137/week @ 2024-09-27 2176/week @ 2024-10-04 2235/week @ 2024-10-11 2953/week @ 2024-10-18 3149/week @ 2024-10-25 4300/week @ 2024-11-01 2972/week @ 2024-11-08 3843/week @ 2024-11-15 3433/week @ 2024-11-22 5524/week @ 2024-11-29 4619/week @ 2024-12-06 4808/week @ 2024-12-13 2600/week @ 2024-12-20 1975/week @ 2024-12-27 3331/week @ 2025-01-03

13,521 downloads per month
Used in 26 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–365KB