Skip to content

Commit

Permalink
Add Rust MSRV
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromfedricci committed Dec 14, 2023
1 parent 6da4904 commit c83736d
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,19 @@ jobs:
--feature-powerset
--skip yield,thread_local
msrv:
name: MSRV
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust 1.65.0
run: rustup toolchain install 1.65.0
- name: Set Rust 1.65.0 as default
run: rustup default 1.65.0
- name: Check MSRV
run: cargo check --all-features

docs:
name: Docs
runs-on: ubuntu-latest
Expand Down
14 changes: 13 additions & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ command = "cargo"
env = { "RUSTDOCFLAGS" = "--cfg docsrs" }
args = ["doc", "--all-features", "--open"]

# Check MSRV.
[tasks.msrv]
toolchain = "1.65.0"
command = "cargo"
# TODO: add `--all` for benches.
args = ["check", "--all-features"]

# Lint all feature combinations with cargo-hack.
[tasks.lint]
command = "cargo"
Expand All @@ -42,6 +49,11 @@ install_crate = { rustup_component_name = "miri" }
command = "cargo"
args = ["miri", "test", "--all-features", "${@}"]

# Check code coverage with tarpaulin (all features).
[tasks.tarpaulin]
command = "cargo"
args = ["tarpaulin", "--all-features", "--engine", "llvm", "--out", "xml"]

# Run Loom tests.
[tasks.loom-test]
command = "cargo"
Expand All @@ -52,7 +64,7 @@ args = ["test", "--lib", "--release", "--all-features", "${@}"]
[tasks.loom-check]
command = "cargo"
env = { "RUSTFLAGS" = "${CFG_LOOM}" }
args = ["check", "--profile", "test", "--all-features", "${@}"]
args = ["check", "--profile", "test", "--all-features"]

# Lint all feature combinations with cargo-hack on test profile and Loom cfg.
[tasks.loom-lint]
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@ This feature implements the [`RawMutex`] trait from the [lock_api] crate for
`barging::Mutex`. Aliases are provided by the `lock_api` module. This feature
is `no_std` compatible.

## Minimum Supported Rust Version (MSRV)

This crate is guaranteed to compile on a Minimum Supported Rust Version (MSRV)
of 1.65.0 and above. This version will not be changed without a minor version
bump. If you intend to use this crate but can only target a older Rust version,
feel free to open a issue with your specific target, it is possible to lower
this crate MSRV substantially, it just has not been explored yet.

## Related projects

These projects provide MCS lock implementations with slightly different APIs,
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@
#![allow(clippy::module_name_repetitions)]
#![allow(clippy::inline_always)]
#![allow(clippy::doc_markdown)]
#![warn(rust_2021_compatibility)]
#![warn(missing_docs)]

pub mod raw;
Expand Down

0 comments on commit c83736d

Please sign in to comment.