#bencode #serde #serialization #deserialize

serde_bencode

A Serde backed Bencode encoding/decoding library for Rust

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

#198 in Encoding

Download history 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 3187/week @ 2025-03-01 3062/week @ 2025-03-08 3559/week @ 2025-03-15 2823/week @ 2025-03-22 2277/week @ 2025-03-29

12,159 downloads per month
Used in 39 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

~130–355KB