Skip to content

Commit d0aff24

Browse files
authored
Reorder some TOML sections (#3360)
1 parent dd8d4a4 commit d0aff24

File tree

7 files changed

+113
-105
lines changed

7 files changed

+113
-105
lines changed

axum-core/Cargo.toml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,23 @@ readme = "README.md"
1111
repository = "https://github.com/tokio-rs/axum"
1212
version = "0.5.2" # remember to bump the version that axum and axum-extra depend on
1313

14+
[package.metadata.cargo-public-api-crates]
15+
allowed = [
16+
# not 1.0
17+
"futures_core",
18+
"tower_layer",
19+
# >=1.0
20+
"bytes",
21+
"http",
22+
"http_body",
23+
]
24+
25+
[package.metadata.cargo-machete]
26+
ignored = ["tower-http"] # See __private_docs feature
27+
28+
[package.metadata.docs.rs]
29+
all-features = true
30+
1431
[features]
1532
tracing = ["dep:tracing"]
1633

@@ -44,21 +61,3 @@ tower-http = { version = "0.6.0", features = ["limit"] }
4461

4562
[lints]
4663
workspace = true
47-
48-
[package.metadata.cargo-public-api-crates]
49-
allowed = [
50-
# not 1.0
51-
"futures_core",
52-
"tower_layer",
53-
54-
# >=1.0
55-
"bytes",
56-
"http",
57-
"http_body",
58-
]
59-
60-
[package.metadata.cargo-machete]
61-
ignored = ["tower-http"] # See __private_docs feature
62-
63-
[package.metadata.docs.rs]
64-
all-features = true

axum-extra/Cargo.toml

Lines changed: 38 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,42 @@ readme = "README.md"
1111
repository = "https://github.com/tokio-rs/axum"
1212
version = "0.10.1"
1313

14+
[package.metadata.docs.rs]
15+
all-features = true
16+
17+
[package.metadata.cargo-public-api-crates]
18+
allowed = [
19+
"axum",
20+
"axum_core",
21+
"axum_macros",
22+
"bytes",
23+
"cookie",
24+
"futures_core",
25+
"futures_util",
26+
"headers",
27+
"headers_core",
28+
"http",
29+
"http_body",
30+
"pin_project_lite",
31+
"prost",
32+
"serde",
33+
"tokio",
34+
"tokio_util",
35+
"tower_layer",
36+
"tower_service",
37+
]
38+
1439
[features]
1540
default = ["tracing"]
1641

1742
async-read-body = ["dep:tokio-util", "tokio-util?/io", "dep:tokio"]
18-
file-stream = ["dep:tokio-util", "tokio-util?/io", "dep:tokio", "tokio?/fs", "tokio?/io-util"]
43+
file-stream = [
44+
"dep:tokio-util",
45+
"tokio-util?/io",
46+
"dep:tokio",
47+
"tokio?/fs",
48+
"tokio?/io-util",
49+
]
1950
attachment = ["dep:tracing"]
2051
error-response = ["dep:tracing", "tracing/std"]
2152
cookie = ["dep:cookie"]
@@ -39,7 +70,12 @@ scheme = []
3970
query = ["dep:form_urlencoded", "dep:serde_html_form", "dep:serde_path_to_error"]
4071
tracing = ["axum-core/tracing", "axum/tracing", "dep:tracing"]
4172
typed-header = ["dep:headers"]
42-
typed-routing = ["dep:axum-macros", "dep:percent-encoding", "dep:serde_html_form", "dep:form_urlencoded"]
73+
typed-routing = [
74+
"dep:axum-macros",
75+
"dep:percent-encoding",
76+
"dep:serde_html_form",
77+
"dep:form_urlencoded",
78+
]
4379

4480
# Enabled by docs.rs because it uses all-features
4581
__private_docs = [
@@ -95,28 +131,3 @@ tracing-subscriber = "0.3.19"
95131

96132
[lints]
97133
workspace = true
98-
99-
[package.metadata.docs.rs]
100-
all-features = true
101-
102-
[package.metadata.cargo-public-api-crates]
103-
allowed = [
104-
"axum",
105-
"axum_core",
106-
"axum_macros",
107-
"bytes",
108-
"cookie",
109-
"futures_core",
110-
"futures_util",
111-
"headers",
112-
"headers_core",
113-
"http",
114-
"http_body",
115-
"pin_project_lite",
116-
"prost",
117-
"serde",
118-
"tokio",
119-
"tokio_util",
120-
"tower_layer",
121-
"tower_service",
122-
]

axum-macros/Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,19 @@ readme = "README.md"
1111
repository = "https://github.com/tokio-rs/axum"
1212
version = "0.5.0" # remember to also bump the version that axum and axum-extra depends on
1313

14-
[features]
15-
default = []
16-
__private = ["syn/visit-mut"]
14+
[package.metadata.cargo-public-api-crates]
15+
allowed = []
16+
17+
[package.metadata.docs.rs]
18+
all-features = true
1719

1820
[lib]
1921
proc-macro = true
2022

23+
[features]
24+
default = []
25+
__private = ["syn/visit-mut"]
26+
2127
[dependencies]
2228
proc-macro2 = "1.0"
2329
quote = "1.0"
@@ -40,9 +46,3 @@ trybuild = "1.0.63"
4046

4147
[lints]
4248
workspace = true
43-
44-
[package.metadata.cargo-public-api-crates]
45-
allowed = []
46-
47-
[package.metadata.docs.rs]
48-
all-features = true

axum/Cargo.toml

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,34 @@ license = "MIT"
1111
readme = "README.md"
1212
repository = "https://github.com/tokio-rs/axum"
1313

14+
[package.metadata.docs.rs]
15+
all-features = true
16+
17+
[package.metadata.playground]
18+
features = ["http1", "http2", "json", "multipart", "ws"]
19+
20+
[package.metadata.cargo-public-api-crates]
21+
allowed = [
22+
# our crates
23+
"axum_core",
24+
"axum_macros",
25+
# not 1.0
26+
"futures_core",
27+
"futures_sink",
28+
"futures_util",
29+
"pin_project_lite",
30+
"tower_layer",
31+
"tower_service",
32+
# >=1.0
33+
"bytes",
34+
"http",
35+
"http_body",
36+
"serde",
37+
"tokio",
38+
# for the `__private` feature
39+
"reqwest",
40+
]
41+
1442
[features]
1543
default = [
1644
"form",
@@ -32,7 +60,14 @@ matched-path = []
3260
multipart = ["dep:multer"]
3361
original-uri = []
3462
query = ["dep:form_urlencoded", "dep:serde_urlencoded", "dep:serde_path_to_error"]
35-
tokio = ["dep:hyper-util", "dep:tokio", "tokio/net", "tokio/rt", "tower/make", "tokio/macros"]
63+
tokio = [
64+
"dep:hyper-util",
65+
"dep:tokio",
66+
"tokio/net",
67+
"tokio/rt",
68+
"tower/make",
69+
"tokio/macros",
70+
]
3671
tower-log = ["tower/log"]
3772
tracing = ["dep:tracing", "axum-core/tracing"]
3873
ws = ["dep:hyper", "tokio", "dep:tokio-tungstenite", "dep:sha1", "dep:base64"]
@@ -42,7 +77,8 @@ __private_docs = [
4277
# but they need the same sort of treatment as below to be complete
4378
"axum-core/__private_docs",
4479
# Enables upstream things linked to in docs
45-
"tower/full", "dep:tower-http",
80+
"tower/full",
81+
"dep:tower-http",
4682
]
4783

4884
# This feature is used to enable private test helper usage
@@ -187,43 +223,6 @@ features = [
187223
[lints]
188224
workspace = true
189225

190-
[package.metadata.docs.rs]
191-
all-features = true
192-
193-
[package.metadata.playground]
194-
features = [
195-
"http1",
196-
"http2",
197-
"json",
198-
"multipart",
199-
"ws",
200-
]
201-
202-
[package.metadata.cargo-public-api-crates]
203-
allowed = [
204-
# our crates
205-
"axum_core",
206-
"axum_macros",
207-
208-
# not 1.0
209-
"futures_core",
210-
"futures_sink",
211-
"futures_util",
212-
"pin_project_lite",
213-
"tower_layer",
214-
"tower_service",
215-
216-
# >=1.0
217-
"bytes",
218-
"http",
219-
"http_body",
220-
"serde",
221-
"tokio",
222-
223-
# for the `__private` feature
224-
"reqwest",
225-
]
226-
227226
[[bench]]
228227
name = "benches"
229228
harness = false

axum/src/docs/extract.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,5 +686,4 @@ logs, enable the `tracing` feature for axum (enabled by default) and the
686686
[customize-extractor-error]: https://github.com/tokio-rs/axum/blob/main/examples/customize-extractor-error/src/main.rs
687687
[`HeaderMap`]: https://docs.rs/http/latest/http/header/struct.HeaderMap.html
688688
[`Request`]: https://docs.rs/http/latest/http/struct.Request.html
689-
[`RequestParts::body_mut`]: crate::extract::RequestParts::body_mut
690689
[`JsonRejection::JsonDataError`]: rejection::JsonRejection::JsonDataError

examples/simple-router-wasm/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ version = "0.1.0"
44
edition = "2018"
55
publish = false
66

7+
[package.metadata.cargo-machete]
8+
ignored = ["axum-extra"]
9+
710
[dependencies]
811
# `default-features = false` to not depend on tokio features which don't support wasm
912
# you can still pull in tokio manually and only add features that tokio supports for wasm
@@ -14,6 +17,3 @@ axum-extra = { path = "../../axum-extra", default-features = false }
1417
futures-executor = "0.3.21"
1518
http = "1.0.0"
1619
tower-service = "0.3.1"
17-
18-
[package.metadata.cargo-machete]
19-
ignored = ["axum-extra"]

examples/websockets/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ version = "0.1.0"
44
edition = "2021"
55
publish = false
66

7+
[[bin]]
8+
name = "example-websockets"
9+
path = "src/main.rs"
10+
11+
[[bin]]
12+
name = "example-client"
13+
path = "src/client.rs"
14+
715
[dependencies]
816
axum = { path = "../../axum", features = ["ws"] }
917
axum-extra = { path = "../../axum-extra", features = ["typed-header"] }
@@ -15,11 +23,3 @@ tokio-tungstenite = "0.26.0"
1523
tower-http = { version = "0.6.1", features = ["fs", "trace"] }
1624
tracing = "0.1"
1725
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
18-
19-
[[bin]]
20-
name = "example-websockets"
21-
path = "src/main.rs"
22-
23-
[[bin]]
24-
name = "example-client"
25-
path = "src/client.rs"

0 commit comments

Comments
 (0)