Skip to content

Commit 5e9445b

Browse files
committed
fix: v2 related fixed
1 parent f4dac36 commit 5e9445b

61 files changed

Lines changed: 1917 additions & 881 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,54 +49,83 @@ jobs:
4949
- uses: Swatinem/rust-cache@v2
5050
with:
5151
key: clippy-${{ matrix.label }}
52-
- run: cargo clippy --workspace --no-deps ${{ matrix.features }} -- -D warnings
52+
# `--tests --examples` extends the lint sweep to the integration test
53+
# crate (`tako-rs/tests/*.rs`) and every example. Workspace-level
54+
# `pedantic = warn` opts those in too, so `-D warnings` catches
55+
# regressions like the ones surfaced by the v2 release audit (items
56+
# after statements, ignored unit patterns, map_unwrap_or).
57+
- run: cargo clippy --workspace --no-deps --tests --examples ${{ matrix.features }} -- -D warnings
5358

5459
test:
55-
name: test (${{ matrix.os }} / ${{ matrix.label }})
60+
name: test (${{ matrix.os }} / ${{ matrix.toolchain }} / ${{ matrix.label }})
5661
runs-on: ${{ matrix.os }}
5762
strategy:
5863
fail-fast: false
5964
matrix:
6065
os: [ubuntu-latest, macos-latest, windows-latest]
66+
toolchain: [stable]
6167
label: [default]
6268
features: [""]
6369
include:
6470
- os: ubuntu-latest
71+
toolchain: stable
6572
label: rich
6673
features: --features "tls,http2,plugins,signals,multipart,simd,protobuf,ip-filter,hmac-signature,json-schema,zstd,client,typed-header,zero-copy-extractors,jwt-simple,file-stream"
6774
- os: ubuntu-latest
75+
toolchain: stable
6876
label: http3
6977
features: --features "tls,http2,http3,plugins,signals"
7078
- os: ubuntu-latest
79+
toolchain: stable
7180
label: all-features
7281
# Regression guard for A1 (compio/tokio !Send mismatch under
7382
# workspace-wide --all-features test-build). Re-fixing the
7483
# gated test bins requires both runtimes resolved at once.
7584
features: --all-features
85+
# Beta toolchain — early-warning for nightly→stable regressions
86+
# picked up by upstream crates.
87+
- os: ubuntu-latest
88+
toolchain: beta
89+
label: default
90+
features: ""
91+
# MSRV pin — make sure the declared `rust-version = "1.95"` actually
92+
# builds AND passes tests. The plain `msrv` job below only builds;
93+
# this one runs the rich feature set under the floor toolchain.
94+
- os: ubuntu-latest
95+
toolchain: "1.95"
96+
label: msrv-rich
97+
features: --features "tls,http2,plugins,signals,multipart,simd,protobuf,jwt-simple,client,typed-header,zero-copy-extractors,file-stream"
7698
env:
7799
# Tests don't need to break on every clippy nit; only enforce build-warnings
78100
# in build/clippy/doc jobs.
79101
RUSTFLAGS: ""
80102
steps:
81103
- uses: actions/checkout@v4
82-
- uses: dtolnay/rust-toolchain@stable
104+
- uses: dtolnay/rust-toolchain@master
105+
with:
106+
toolchain: ${{ matrix.toolchain }}
83107
- uses: Swatinem/rust-cache@v2
84108
with:
85-
key: test-${{ matrix.os }}-${{ matrix.label }}
109+
key: test-${{ matrix.os }}-${{ matrix.toolchain }}-${{ matrix.label }}
86110
- run: cargo test --workspace ${{ matrix.features }}
87111

88112
msrv:
89-
name: MSRV (latest stable)
113+
name: MSRV build (1.95)
90114
runs-on: ubuntu-latest
91115
env:
92116
RUSTFLAGS: ""
93117
steps:
94118
- uses: actions/checkout@v4
95-
- uses: dtolnay/rust-toolchain@stable
119+
- uses: dtolnay/rust-toolchain@master
120+
with:
121+
toolchain: "1.95"
96122
- uses: Swatinem/rust-cache@v2
97123
with:
98-
key: msrv-stable
99-
- run: cargo build --workspace
124+
key: msrv-1.95
125+
# Plain `cargo build` on the declared MSRV — paired with the
126+
# `toolchain: 1.95` row of the test matrix above so we catch both
127+
# compilation errors and behaviour drift at the floor toolchain.
128+
- run: cargo build --workspace --all-features
100129

101130
doc:
102131
name: rustdoc
@@ -107,7 +136,11 @@ jobs:
107136
- uses: Swatinem/rust-cache@v2
108137
with:
109138
key: doc
110-
- run: cargo doc --no-deps --workspace --features "tls,http2,http3,plugins,signals,multipart,simd,client,typed-header,zero-copy-extractors,utoipa,async-graphql,grpc"
139+
# `--all-features` catches broken intra-doc links that only appear on
140+
# feature-gated modules (timeout middleware, webtransport, compio
141+
# adapters). `RUSTDOCFLAGS: -D rustdoc::broken-intra-doc-links` from the
142+
# workflow `env` then turns those into hard failures.
143+
- run: cargo doc --no-deps --workspace --all-features
111144

112145
deny:
113146
name: cargo-deny

Cargo.toml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ http-body = "1.0.1"
8787
http-body-util = "0.1.3"
8888
hyper = { version = "1.6.0", features = ["full"] }
8989
hyper-util = { version = "0.1.14", features = ["tokio"] }
90-
linkme = "0.3"
90+
linkme = "0.3.36"
9191
matchit = "0.9.1"
9292
mime = "0.3.17"
9393
mime_guess = "2.0.5"
@@ -99,9 +99,9 @@ serde = { version = "1.0.219", features = ["derive"] }
9999
serde_bytes = "0.11.17"
100100
serde_json = "1.0.140"
101101
serde_urlencoded = "0.7"
102-
serde_html_form = "0.2"
102+
serde_html_form = "0.2.8"
103103
sha1 = "0.10.6"
104-
smallvec = "1"
104+
smallvec = "1.15.1"
105105
tokio = { version = "1.52.1", features = ["full"] }
106106
tokio-stream = "0.1.17"
107107
tokio-tungstenite = "0.29.0"
@@ -113,18 +113,18 @@ urlencoding = "2.1.3"
113113
# Optional / feature-gated
114114
ahash = { version = "0.8.12", features = ["serde"] }
115115
brotli = "8.0.1"
116-
cron = "0.15"
117-
headers = "0.4"
116+
cron = "0.15.0"
117+
headers = "0.4.1"
118118
compio = { version = "0.18.0", features = ["macros", "rustls", "time", "fs", "net"] }
119119
cyper-core = "0.8.0"
120120
flate2 = "1.1.2"
121121
h3 = "0.0.8"
122122
h3-quinn = "0.0.10"
123-
hkdf = "0.12"
124-
hmac = "0.12"
125-
httpdate = "1.0"
126-
ipnet = "2.11"
127-
listenfd = "1.0"
123+
hkdf = "0.12.4"
124+
hmac = "0.12.1"
125+
httpdate = "1.0.3"
126+
ipnet = "2.11.0"
127+
listenfd = "1.0.2"
128128
multer = "3.1.0"
129129
opentelemetry = "0.31.0"
130130
opentelemetry-otlp = { version = "0.31.0", features = ["metrics", "http-proto"] }
@@ -133,25 +133,25 @@ prometheus = "0.13.4"
133133
jsonschema = { version = "0.30", default-features = false }
134134
prost = "0.14.1"
135135
quinn = "0.11.9"
136-
sha2 = "0.10"
136+
sha2 = "0.10.9"
137137
rustls = "0.23.28"
138138
rustls-pemfile = "2.2.0"
139-
send_wrapper = "0.6"
139+
send_wrapper = "0.6.0"
140140
simd-json = "0.15.1"
141141
sonic-rs = "0.5.6"
142142
subtle = "2.6.1"
143143
tikv-jemallocator = "0.6.0"
144144
tokio-rustls = "0.26.2"
145-
validator = { version = "0.20", features = ["derive"] }
146-
garde = { version = "0.22", features = ["derive"] }
147-
tokio-vsock = "0.7"
145+
validator = { version = "0.20.0", features = ["derive"] }
146+
garde = { version = "0.22.1", features = ["derive"] }
147+
tokio-vsock = "0.7.2"
148148
uuid = { version = "1.17.0", features = ["v4"] }
149149
webpki-roots = "1.0.1"
150150
rustls-native-certs = "0.8"
151151
zstd = "0.13.3"
152152

153153
# Bench-only
154-
criterion = { version = "0.7", features = ["html_reports"] }
154+
criterion = { version = "0.7.0", features = ["html_reports"] }
155155

156156
[profile.release]
157157
lto = "fat"

README.md

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,6 @@
22
[![Crates.io](https://img.shields.io/crates/v/tako-rs?style=flat-square)](https://crates.io/crates/tako-rs)
33
![License](https://img.shields.io/crates/l/tako-rs?style=flat-square)
44

5-
> **⚠️ Tako 2.0 is in progress on `main`.** The default branch carries breaking
6-
> changes (new `Server::builder`, `Router::with_state`, `nest`/`scope`, `405 +
7-
> Allow`, RFC 7807 `problem+json`, runtime-agnostic `ServerHandle`, …) that are
8-
> **not yet released**. For production, install the published 1.x line from
9-
> crates.io:
10-
>
11-
> ```toml
12-
> [dependencies]
13-
> tako-rs = "1"
14-
> ```
15-
>
16-
> Track 2.0 work in [`V2_ROADMAP.md`](./V2_ROADMAP.md). Expect API churn until
17-
> the 2.0 alpha is tagged.
18-
195
# 🐙 Tako — Multi-Transport Rust Framework for Modern Network Services
206

217
> **Tako** (*"octopus"* in Japanese) is a pragmatic, ergonomic and extensible Rust framework for services that go beyond plain HTTP.
@@ -87,7 +73,8 @@ Choose Tako when your service needs one or more of these:
8773
| `PrivateCookieJar` | Encrypted cookies |
8874
| `BasicAuth` | HTTP Basic authentication |
8975
| `BearerAuth` | Bearer token extraction |
90-
| `JwtClaims<T>` | JWT token validation & claims |
76+
| `JwtClaimsUnverified<T>` | Unverified JWT claims decode (signature **not** checked) |
77+
| `JwtClaimsVerified<T>` | Signature-verified JWT claims (via `tako-plugins::JwtAuth`) |
9178
| `ApiKey` | API key from header/query |
9279
| `Accept` | Content negotiation |
9380
| `AcceptLanguage` | Language negotiation |
@@ -150,7 +137,11 @@ Choose Tako when your service needs one or more of these:
150137

151138
[API Documentation](https://docs.rs/tako-rs/latest/tako/)
152139

153-
MSRV 1.87.0 | Edition 2024
140+
MSRV 1.95 | Edition 2024
141+
142+
See [`STABILITY.md`](./STABILITY.md) for the full semver and MSRV policy,
143+
[`MIGRATION_1_TO_2.md`](./MIGRATION_1_TO_2.md) for upgrading from 1.x, and
144+
[`CHANGELOG.md`](./CHANGELOG.md) for release notes.
154145

155146
## Tako in Production
156147

@@ -181,7 +172,7 @@ Add **Tako** to your `Cargo.toml`:
181172

182173
```toml
183174
[dependencies]
184-
tako-rs = "1"
175+
tako-rs = "2"
185176
```
186177

187178

0 commit comments

Comments
 (0)