Skip to content

Commit

Permalink
Add unsigned integer decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
bluk committed Oct 1, 2023
0 parents commit 904047a
Show file tree
Hide file tree
Showing 20 changed files with 1,634 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .cargo/audit.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[advisories]

[output]
deny = ["warnings", "yanked", "unsound", "unmaintained"]
quiet = false
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/leb128fmt/"
schedule:
interval: weekly
open-pull-requests-limit: 10
- package-ecosystem: cargo
directory: "/leb128fmt-tests/"
schedule:
interval: weekly
open-pull-requests-limit: 10
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
36 changes: 36 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Rust Security Audit

permissions:
contents: read

on:
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
pull_request:

jobs:
audit:
strategy:
matrix:
os:
- ubuntu-latest
rust:
- stable
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt
- name: Rust Version
run: rustc --version
- run: cargo install cargo-audit
- run: cargo generate-lockfile
- run: cargo audit --deny warnings
122 changes: 122 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Rust CI

permissions:
contents: read

on:
push:

pull_request:

jobs:
build:
name: Build
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
rust:
- stable
- 1.56.0
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Rust Version
run: rustc --version
- name: Run cargo build (--all-features)
run: cargo build --all-features --release
- name: Run cargo build (--no-default-features)
run: cargo build --no-default-features --release
- name: Run cargo build (--features alloc)
run: cargo build --no-default-features --release --features alloc
- name: Run cargo build (--features std)
run: cargo build --no-default-features --release --features std
test:
name: Test
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
rust:
- stable
- 1.56.0
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Rust Version
run: rustc --version
- name: Run cargo check (--all-features)
run: cargo check --all-features
- name: Run cargo test (default)
run: cargo test
- name: Run cargo test (--all-features)
run: cargo test --all-features
- name: Run cargo test (--no-default-features)
run: cargo test --no-default-features
- name: Run cargo test (--features alloc)
run: cargo test --no-default-features --features alloc
- name: Run cargo test (--features std)
run: cargo test --no-default-features --features std
rustfmt:
name: Format
strategy:
matrix:
os:
- ubuntu-latest
rust:
- stable
- nightly
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt
- name: Rust Version
run: rustc --version
- run: cargo fmt --all -- --check
clippy:
name: Clippy
strategy:
matrix:
os:
- ubuntu-latest
rust:
- stable
- nightly
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: clippy
- name: Run cargo clippy
run: cargo clippy --all-targets --all-features
80 changes: 80 additions & 0 deletions .github/workflows/leb128fmt-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Rust CI Tests

permissions:
contents: read

on:
push:

pull_request:

defaults:
run:
working-directory: leb128fmt-tests

jobs:
test:
name: Test
strategy:
matrix:
os:
- ubuntu-latest
rust:
- stable
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Rust Version
run: rustc --version
- name: Run cargo test (--all-features)
run: cargo test --all-features
rustfmt:
name: Format
strategy:
matrix:
os:
- ubuntu-latest
rust:
- stable
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt
- name: Rust Version
run: rustc --version
- run: cargo fmt --all -- --check
clippy:
name: Clippy
strategy:
matrix:
os:
- ubuntu-latest
rust:
- stable
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: clippy
- name: Run cargo clippy
run: cargo clippy --all-targets --all-features
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
/Cargo.lock
9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[workspace]
resolver = "2"
members = [
"leb128fmt",
]

exclude = [
"leb128fmt-tests",
]
Loading

0 comments on commit 904047a

Please sign in to comment.