Skip to content

Commit d9b0789

Browse files
committed
Add an MSRV policy; test against the MSRV.
This adds an MSRV policy to tock-registers. This policy currently matches libtock-rs: bump to a newer stable release anytime doing so is convenient. This MSRV is specified in Cargo.toml and is tested against in CI.
1 parent 1327302 commit d9b0789

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/license_check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ jobs:
2222
repository: tock/tock
2323

2424
- name: License check
25-
run: cargo run --manifest-path=../tock/tools/ci/license-checker/Cargo.toml --release
25+
run: cargo +stable run --manifest-path=../tock/tools/ci/license-checker/Cargo.toml --release
2626
working-directory: tock-registers

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ keywords = ["tock", "embedded", "registers", "mmio", "bare-metal"]
1414
categories = ["data-structures", "embedded", "no-std"]
1515
license = "MIT/Apache-2.0"
1616
edition = "2021"
17+
# This must be kept in sync with rust-toolchain.toml; please see that file for
18+
# more information.
19+
rust-version = "1.82"
1720

1821
[features]
1922
default = [ "register_types" ]

rust-toolchain.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Licensed under the Apache License, Version 2.0 or the MIT License.
2+
# SPDX-License-Identifier: Apache-2.0 OR MIT
3+
# Copyright Tock Contributors 2026.
4+
5+
[toolchain]
6+
# This is tock-registers' Minimum Supported Rust Version (MSRV).
7+
#
8+
# Update policy: Update this if doing so allows you to use a Rust feature that
9+
# you'd like to use. When you do so, update this to the first Rust version that
10+
# includes that feature. Whenever this value is updated, the rust-version field
11+
# in Cargo.toml must be updated as well.
12+
channel = "1.82"
13+
components = ["clippy", "rustfmt"]

0 commit comments

Comments
 (0)