This repository has been archived by the owner on Dec 1, 2023. It is now read-only.
forked from toby/serde-bencode
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #1: New
torrust-serde-bencode
package
625081a new torrust-serde-bencode package (Jose Celano) Pull request description: Minor changes and package configuration changed. ACKs for top commit: josecelano: ACK 625081a Tree-SHA512: 59d6937975f2cf646d90da3880404100c16ff81a8c662b4bc8ad52dae2a81e77172e6d3f95ac70f3b0c17c2be3d1093479c82d62b06807d16b3646c21639f515
- Loading branch information
Showing
10 changed files
with
117 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Testing | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
unit: | ||
name: Units | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
toolchain: [stable, nightly] | ||
|
||
steps: | ||
- id: checkout | ||
name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- id: setup | ||
name: Setup Toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
components: llvm-tools-preview | ||
|
||
- id: cache | ||
name: Enable Job Cache | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- id: test | ||
name: Run Unit Tests | ||
run: cargo test --tests --benches --examples --workspace --all-targets --all-features | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"recommendations": [ | ||
"streetsidesoftware.code-spell-checker", | ||
"rust-lang.rust-analyzer" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"[rust]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"rust-analyzer.checkOnSave": true, | ||
"rust-analyzer.check.command": "clippy", | ||
"rust-analyzer.check.allTargets": true, | ||
"rust-analyzer.check.extraArgs": [ | ||
"--", | ||
"-D", | ||
"clippy::correctness", | ||
"-D", | ||
"clippy::suspicious", | ||
"-W", | ||
"clippy::complexity", | ||
"-W", | ||
"clippy::perf", | ||
"-W", | ||
"clippy::style", | ||
"-W", | ||
"clippy::pedantic", | ||
], | ||
"rust-analyzer.linkedProjects": [ | ||
"./Cargo.toml" | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
# serde-bencode | ||
# Torrust Serde Bencode | ||
|
||
A [Serde](https://github.com/serde-rs/serde) backed [Bencode](https://en.wikipedia.org/wiki/Bencode) | ||
encoding/decoding library for Rust. | ||
|
||
Forked from: <https://github.com/toby/serde-bencode> due to inactivity in upstream repo. | ||
|
||
## Installation | ||
|
||
Add the following to your `Cargo.toml`: | ||
|
||
```toml | ||
[dependencies] | ||
serde_bencode = "^0.2.3" | ||
torrust-serde-bencode = "^0.2.3" | ||
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. | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"words": [ | ||
"bencoded", | ||
"Serde" | ||
], | ||
"enableFiletypes": [ | ||
"dockerfile", | ||
"shellscript", | ||
"toml" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters