Skip to content

Commit 9ecb34b

Browse files
committed
Specify the minimum supported Rust version
1 parent 75076ce commit 9ecb34b

4 files changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,38 @@ jobs:
5656
cargo vet --version
5757
cargo vet --locked
5858
59+
msrv:
60+
strategy:
61+
matrix:
62+
os:
63+
- windows-2025
64+
- ubuntu-24.04
65+
66+
runs-on: ${{ matrix.os }}
67+
68+
env:
69+
EXPECTED_MSRV: "1.82"
70+
71+
steps:
72+
- uses: actions/checkout@v6
73+
74+
- uses: actions/cache@v5
75+
id: cache-cargo
76+
with:
77+
path: |
78+
~/.cargo/bin/
79+
~/.cargo/registry/index/
80+
~/.cargo/registry/cache/
81+
~/.cargo/git/db/
82+
target/
83+
key: ${{ runner.os }}-msrv-cargo-${{ hashFiles('**/Cargo.lock') }}
84+
85+
- name: Install Rust v${{ env.EXPECTED_MSRV }}
86+
run: rustup install ${{ env.EXPECTED_MSRV }}
87+
88+
- name: Run cargo build using Rust v${{ env.EXPECTED_MSRV }}
89+
run: cargo +${{ env.EXPECTED_MSRV }} build --workspace --all-features
90+
5991
build:
6092
strategy:
6193
matrix:

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ repository.workspace = true
77
categories.workspace = true
88
license.workspace = true
99
edition.workspace = true
10+
rust-version.workspace = true
1011

1112
[dependencies]
1213
dirs = ">= 1.0.0, < 7"
@@ -45,6 +46,7 @@ repository = "https://github.com/Ortham/libloadorder.git"
4546
categories = ["games"]
4647
license = "GPL-3.0"
4748
edition = "2021"
49+
rust-version = "1.82"
4850

4951
# Deny some rustc lints that are allow-by-default.
5052
[workspace.lints.rust]

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,7 @@ cmake -B ffi/build ffi
4747
cmake --build ffi/build
4848
ctest --test-dir ffi/build --output-on-failure
4949
```
50+
51+
## Minimum supported Rust version
52+
53+
The minimum supported Rust version is `1.82`. This may change at any time, but there is a CI job to check that it does not change unexpectedly.

ffi/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ repository.workspace = true
88
categories.workspace = true
99
license.workspace = true
1010
edition.workspace = true
11+
rust-version.workspace = true
1112

1213
[dependencies]
1314
libloadorder = { path = ".." }

0 commit comments

Comments
 (0)