clhlock 0.2.2

An implementation of Craig and, indenpendently, Magnussen, Landin, and Hagersten queue lock for mutual exclusion, referred to as CLH lock.
Documentation
[env]
CFG_LOOM = "--cfg loom"
CLIPPY_FLAGS = "-D clippy::pedantic -D clippy::nursery"
CLIPPY_FLAGS_LOOM = "${CFG_LOOM} ${CLIPPY_FLAGS}"

# Don't run these tasks for all crates in the workspace.
[config]
default_to_workspace = false

# Build package for no_std environment.
[tasks.no-std]
command = "cargo"
args = ["hack", "build", "--target", "thumbv7m-none-eabi", "--feature-powerset",
        "--no-dev-deps", "--skip", "yield"]

# Build docs for docs.rs.
[tasks.docsrs]
toolchain = "nightly"
command = "cargo"
env = { "RUSTDOCFLAGS" = "--cfg docsrs" }
args = ["rustdoc", "--all-features", "--open", "--", "--default-theme", "ayu"]

# Check MSRV.
[tasks.msrv]
# NOTE: We are actually installing the first nightly 1.66.0. It should be
# equivalent to stable 1.65.0. We need the nightly version to use the sparse
# registry feature. This massively improves the index download.
# Link: https://blog.rust-lang.org/2022/06/22/sparse-registry-testing.html
toolchain = "nightly-2022-09-18"
command = "cargo"
env = { "CARGO_UNSTABLE_SPARSE_REGISTRY" = "true" }
args = ["check", "--all-features"]

# Check semver viloations.
[tasks.semver]
command = "cargo"
args = ["semver-checks", "${@}"]

# Run all documentation snippets.
[tasks.doc-test]
command = "cargo"
args = ["test", "--doc", "--all-features"]

# Lint all feature combinations with cargo-hack.
[tasks.lint]
command = "cargo"
env = { "RUSTFLAGS" = "${CLIPPY_FLAGS}" }
args = ["hack", "clippy", "--feature-powerset", "--no-dev-deps"]

# Run example.
[tasks.example]
command = "cargo"
env = { "RUSTFLAGS" = "${CLIPPY_FLAGS}" }
args = ["run", "--example", "${@}", "--all-features"]

# Lint all feature combinations with carg-hack on test profile.
[tasks.test-lint]
command = "cargo"
env = { "RUSTFLAGS" = "${CLIPPY_FLAGS}" }
args = ["hack", "clippy", "--profile", "test", "--feature-powerset",
        "--no-dev-deps"]

# Run tests under miri.
# NOTE: must run as: `cargo +nightly make miri`.
[tasks.miri-test]
toolchain = "nightly"
install_crate = { rustup_component_name = "miri" }
command = "cargo"
args = ["miri", "nextest", "run", "--all-features", "${@}"]

[tasks.miri-ignore-leaks]
toolchain = "nightly"
install_crate = { rustup_component_name = "miri" }
command = "cargo"
env = { "MIRIFLAGS" = "-Zmiri-ignore-leaks", "RUSTFLAGS" = "--cfg ignore_leaks" }
args = ["miri", "test", "raw::mutex::test_leaks_expected"]

# 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"
env = { "RUSTFLAGS" = "${CFG_LOOM}" }
args = ["test", "--lib", "--release", "--all-features", "${@}"]

# Check Loom cfg (faster if using the same flags for rust-analyzer).
[tasks.loom-check]
command = "cargo"
env = { "RUSTFLAGS" = "${CFG_LOOM}" }
args = ["check", "--profile", "test", "--all-features"]

# Lint all feature combinations with cargo-hack on test profile and Loom cfg.
[tasks.loom-lint]
command = "cargo"
env = { "RUSTFLAGS" = "${CLIPPY_FLAGS_LOOM}" }
args = ["hack", "clippy", "--profile", "test", "--feature-powerset"]