Skip to content

Commit 8e814d0

Browse files
committed
chore: rework workspace params, MSRV 1.64
* Move common workspace settings to the `[workspace]` sections in the root. * Remove Cargo settings that are identical to the defaults (per Cargo [recommendations](https://doc.rust-lang.org/cargo/reference/manifest.html)) * Add common clippy lint configuration * These require MSRV 1.64 `workspace-inheritance` feature * Fix perl-based method to extract MSRV
1 parent 0fe1d45 commit 8e814d0

File tree

7 files changed

+26
-22
lines changed

7 files changed

+26
-22
lines changed

.github/workflows/ci.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
name: Verify build
5151
strategy:
5252
matrix:
53-
toolchain: [stable, nightly, 1.63.0]
53+
toolchain: [stable, nightly, 1.64.0]
5454
os: [ubuntu-24.04, macos-14, windows-2022]
5555
include:
5656
- toolchain: beta
@@ -65,7 +65,7 @@ jobs:
6565
- name: Update RUSTFLAGS
6666
run: |
6767
set -eux
68-
[ "${{ matrix.toolchain }}" = "1.63.0" ] && echo 'RUSTFLAGS=' >> "$GITHUB_ENV" || true
68+
[ "${{ matrix.toolchain }}" = "1.64.0" ] && echo 'RUSTFLAGS=' >> "$GITHUB_ENV" || true
6969
7070
- name: Setup Rust toolchain
7171
run: ./ci/install-rust.sh

Cargo.toml

+13-9
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ categories = ["external-ffi-bindings", "no-std", "os"]
66
exclude = ["/ci/*", "/.github/*", "/.cirrus.yml", "/triagebot.toml"]
77
description = "Raw FFI bindings to platform libraries like libc."
88
publish = false # On the main branch, we don't want to publish anything
9-
authors = ["The Rust Project Developers"]
10-
edition = "2021"
11-
license = "MIT OR Apache-2.0"
12-
repository = "https://github.com/rust-lang/libc"
13-
rust-version = "1.63"
9+
authors.workspace = true
10+
edition.workspace = true
11+
license.workspace = true
12+
repository.workspace = true
13+
rust-version.workspace = true
1414

1515
[package.metadata.docs.rs]
1616
features = ["extra_traits"]
@@ -143,14 +143,18 @@ members = [
143143
"libc-test",
144144
]
145145

146-
# FIXME(msrv): These should be renamed as `[workspace.lints.*]` once MSRV is above 1.64
147-
# This way all crates can use it with `[lints] workspace=true` section
146+
[workspace.package]
147+
authors = ["The Rust Project Developers"]
148+
license = "MIT OR Apache-2.0"
149+
edition = "2021"
150+
repository = "https://github.com/rust-lang/libc"
151+
rust-version = "1.64"
148152

149-
[lints.rust]
153+
[workspace.lints.rust]
150154
# FIXME(cleanup): make ident usage consistent in each file
151155
unused_qualifications = "allow"
152156

153-
[lints.clippy]
157+
[workspace.lints.clippy]
154158
missing_safety_doc = "allow"
155159

156160
# FIXME(clippy): all these are default lints and should probably be fixed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ libc = "0.2"
5151

5252
## Rust version support
5353

54-
The minimum supported Rust toolchain version is currently **Rust 1.63**.
54+
The minimum supported Rust toolchain version is currently **Rust 1.64**.
5555

5656
Increases to the MSRV are allowed to change without a major (i.e. semver-
5757
breaking) release in order to avoid a ripple effect in the ecosystem. A policy

ctest-test/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "ctest-test"
33
version = "0.1.0"
44
authors = ["Alex Crichton <[email protected]>"]
55
publish = false
6-
edition = "2021"
6+
edition.workspace = true
77

88
[build-dependencies]
99
ctest = { path = "../ctest" }

ctest/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name = "ctest"
33
version = "0.4.11"
44
description = "Automated tests of FFI bindings."
55
exclude = ["CHANGELOG.md"]
6-
edition = "2021"
7-
license = "MIT OR Apache-2.0"
8-
repository = "https://github.com/rust-lang/libc"
9-
rust-version = "1.63.0"
6+
edition.workspace = true
7+
license.workspace = true
8+
repository.workspace = true
9+
rust-version.workspace = true
1010

1111
[dependencies]
1212
garando_syntax = "0.1"

ctest/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ APIs in Rust match the APIs defined in C.
1010

1111
## MSRV (Minimum Supported Rust Version)
1212

13-
The MSRV is 1.63.0 because of the transitive dependencies.
13+
The MSRV is 1.64.0 because of the transitive dependencies.
1414
Note that MSRV may be changed anytime by dependencies.
1515

1616
## Example

libc-test/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name = "libc-test"
33
version = "0.1.0"
44
description = "A test crate for the libc crate."
55
publish = false
6-
authors = ["The Rust Project Developers"]
7-
edition = "2021"
8-
license = "MIT OR Apache-2.0"
9-
repository = "https://github.com/rust-lang/libc"
6+
authors.workspace = true
7+
edition.workspace = true
8+
license.workspace = true
9+
repository.workspace = true
1010

1111
[dependencies]
1212
cfg-if = "1.0.0"

0 commit comments

Comments
 (0)