surelock 0.1.0

Deadlock-free locks for Rust with compile time guarantees, incremental locks, and atomic lock sets.
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.90"
name = "surelock"
version = "0.1.0"
authors = ["Brooklyn Zelenka <hello@brooklynzelenka.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Deadlock-free locks for Rust with compile time guarantees, incremental locks, and atomic lock sets."
readme = "README.md"
keywords = [
    "deadlock",
    "lock",
    "mutex",
    "no_std",
    "sync",
]
categories = [
    "concurrency",
    "no-std",
]
license = "MIT OR Apache-2.0"
repository = "https://codeberg.org/expede/surelock"

[features]
atomic-u64 = []
cortex-m = ["critical-section"]
critical-section = [
    "portable-atomic",
    "portable-atomic/critical-section",
]
default = [
    "std",
    "atomic-u64",
]
escape-hatch = []
levels-32 = []
levels-64 = []
lock-api = ["dep:lock_api"]
portable-atomic = ["dep:portable-atomic"]
std = []

[lib]
name = "surelock"
path = "src/lib.rs"

[[test]]
name = "compile_fail"
path = "tests/compile_fail.rs"

[[test]]
name = "integration"
path = "tests/integration.rs"

[[test]]
name = "lock_order"
path = "tests/lock_order.rs"

[[test]]
name = "property"
path = "tests/property.rs"

[dependencies.lock_api]
version = "0.4"
optional = true
default-features = false

[dependencies.portable-atomic]
version = "1"
optional = true
default-features = false

[dependencies.thiserror]
version = "2.0"
default-features = false

[dev-dependencies.bolero]
version = "0.13.4"

[dev-dependencies.serial_test]
version = "3"

[dev-dependencies.spin]
version = "0.9"
features = [
    "lock_api",
    "mutex",
    "spin_mutex",
]
default-features = false

[dev-dependencies.trybuild]
version = "1"

[lints.clippy]
dbg_macro = "warn"
expect_used = "warn"
fallible_impl_from = "warn"
fn_params_excessive_bools = "warn"
indexing_slicing = "warn"
missing_const_for_fn = "warn"
multiple_crate_versions = "allow"
must_use_candidate = "warn"
panic = "warn"
todo = "warn"
unneeded_field_pattern = "warn"
unwrap_used = "warn"
wildcard_enum_match_arm = "warn"

[lints.clippy.all]
level = "deny"
priority = -1

[lints.clippy.cargo]
level = "deny"
priority = -1

[lints.clippy.pedantic]
level = "deny"
priority = -1

[lints.rust]
missing_copy_implementations = "warn"
missing_debug_implementations = "warn"
missing_docs = "warn"
unreachable_pub = "deny"
unused_extern_crates = "deny"

[lints.rust.future_incompatible]
level = "warn"
priority = -1

[lints.rust.let_underscore]
level = "warn"
priority = -1

[lints.rust.nonstandard_style]
level = "warn"
priority = -1

[lints.rust.rust_2018_idioms]
level = "deny"
priority = -1

[lints.rust.rust_2021_compatibility]
level = "warn"
priority = -1

[profile.bench]
opt-level = 3
lto = "thin"
codegen-units = 1
debug = 2
strip = false

[profile.release]
opt-level = "z"
lto = "fat"
codegen-units = 1
panic = "abort"
strip = "symbols"