Skip to content

Commit c4682e2

Browse files
committed
Initial commit
0 parents  commit c4682e2

File tree

14 files changed

+1418
-0
lines changed

14 files changed

+1418
-0
lines changed

.github/workflows/ci.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
cargo-deny:
10+
name: cargo-deny
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v6
14+
15+
- uses: EmbarkStudios/cargo-deny-action@v2
16+
17+
fmt:
18+
name: rustfmt / 1.91.0
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- uses: actions/checkout@v6
23+
24+
- uses: dtolnay/[email protected]
25+
with:
26+
components: rustfmt
27+
28+
- name: Rust rustfmt
29+
run: cargo fmt --all -- --check
30+
31+
clippy:
32+
name: clippy / 1.91.0
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- uses: actions/checkout@v6
37+
38+
- uses: dtolnay/[email protected]
39+
with:
40+
components: clippy
41+
42+
- name: Run clippy
43+
run: cargo clippy --all-features -- -D warnings
44+
45+
cargo-hack:
46+
name: cargo-hack / 1.91.0
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v6
50+
51+
- uses: dtolnay/[email protected]
52+
53+
- uses: taiki-e/install-action@v2
54+
with:
55+
56+
57+
- name: Run cargo-hack
58+
run: cargo hack check --feature-powerset --no-dev-deps
59+
60+
test:
61+
name: test / ${{ matrix.name }}
62+
runs-on: ubuntu-latest
63+
64+
strategy:
65+
matrix:
66+
include:
67+
- name: stable
68+
rust: stable
69+
- name: beta
70+
rust: beta
71+
- name: nightly
72+
rust: nightly
73+
- name: 1.88.0
74+
rust: 1.88.0
75+
76+
steps:
77+
- uses: actions/checkout@v6
78+
79+
- uses: dtolnay/rust-toolchain@master
80+
with:
81+
toolchain: ${{ matrix.rust }}
82+
83+
- name: Run tests
84+
run: cargo test
85+
86+
- name: Run tests (--features axum)
87+
run: cargo test --features axum

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

.gitlab-ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
stages:
2+
- test
3+
4+
rust:deny:
5+
stage: test
6+
image: rust:1.91-alpine3.22
7+
before_script:
8+
- apk add cargo-deny
9+
script:
10+
- cargo deny check
11+
12+
rust:fmt:
13+
stage: test
14+
image: rust:1.91-alpine3.22
15+
before_script:
16+
- rustup component add rustfmt
17+
script:
18+
- cargo fmt -- --check
19+
20+
rust:clippy:
21+
stage: test
22+
image: rust:1.91-alpine3.22
23+
before_script:
24+
- apk add musl-dev
25+
- rustup component add clippy
26+
script:
27+
- cargo clippy --all-features -- -D warnings
28+
29+
rust:hack:
30+
stage: test
31+
image: rust:1.91-alpine3.22
32+
before_script:
33+
- apk add musl-dev cargo-hack
34+
script:
35+
- cargo hack check --feature-powerset --no-dev-deps
36+
37+
rust:test:
38+
stage: test
39+
image: rust:1.91-alpine3.22
40+
before_script:
41+
- apk add musl-dev
42+
script:
43+
- cargo test
44+
- cargo test --features axum

Cargo.lock

Lines changed: 174 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[package]
2+
name = "range-requests"
3+
description = "Various utilities to deal with `Range Requests`"
4+
categories = ["web-programming", "network-programming"]
5+
keywords = ["range-requests", "range", "content-range", "http"]
6+
version = "0.1.0"
7+
edition = "2024"
8+
license = "MIT OR Apache-2.0"
9+
repository = "https://github.com/M4SS-Code/range-requests"
10+
rust-version = "1.88"
11+
12+
13+
[package.metadata.docs.rs]
14+
features = [
15+
"axum"
16+
]
17+
rustdoc-args = ["--cfg", "docsrs"]
18+
19+
20+
[dependencies]
21+
axum-core = { version = "0.5", optional = true }
22+
bytes = "1"
23+
http = "1"
24+
thiserror = "2"
25+
26+
[features]
27+
default = []
28+
axum = ["dep:axum-core"]

0 commit comments

Comments
 (0)