Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/toby/serde-bencode
Serde backed Bencode encoding/decoding library for Rust.
https://github.com/toby/serde-bencode
bencode decoding-library rust serde serialization
Last synced: 3 days ago
JSON representation
Serde backed Bencode encoding/decoding library for Rust.
- Host: GitHub
- URL: https://github.com/toby/serde-bencode
- Owner: toby
- License: mit
- Created: 2016-12-17T22:45:38.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-06-17T17:34:13.000Z (7 months ago)
- Last Synced: 2024-12-23T07:07:05.493Z (10 days ago)
- Topics: bencode, decoding-library, rust, serde, serialization
- Language: Rust
- Homepage:
- Size: 136 KB
- Stars: 66
- Watchers: 6
- Forks: 16
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Serde Bencode
[![Checking](https://github.com/toby/serde-bencode/actions/workflows/checking.yml/badge.svg)](https://github.com/toby/serde-bencode/actions/workflows/checking.yml) [![Formatting](https://github.com/toby/serde-bencode/actions/workflows/formatting.yml/badge.svg)](https://github.com/toby/serde-bencode/actions/workflows/formatting.yml) [![Testing](https://github.com/toby/serde-bencode/actions/workflows/testing.yaml/badge.svg)](https://github.com/toby/serde-bencode/actions/workflows/testing.yaml) [![Benchmarking](https://github.com/toby/serde-bencode/actions/workflows/benchmarking.yml/badge.svg)](https://github.com/toby/serde-bencode/actions/workflows/benchmarking.yml) [![Coverage](https://github.com/toby/serde-bencode/actions/workflows/coverage.yaml/badge.svg)](https://github.com/toby/serde-bencode/actions/workflows/coverage.yaml) [![Crates.io](https://img.shields.io/crates/v/serde_bencode)](https://crates.io/crates/serde_bencode) [![docs.rs](https://img.shields.io/docsrs/serde_bencode)](https://docs.rs/serde_bencode)
A [Serde](https://github.com/serde-rs/serde) backed [Bencode](https://en.wikipedia.org/wiki/Bencode)
encoding/decoding library for Rust.## Installation
Add the following to your `Cargo.toml`:
```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](examples/parse_torrent.rs). If you compile this crate as a binary, it will print metadata for any Torrent sent to stdin.
## Benchmarking
```console
cargo bench
```