[package] name = "surelock" version = "0.1.1" description = "Deadlock-free locks for Rust with compile time guarantees, incremental locks, and atomic lock sets." readme = "README.md" categories = ["concurrency", "no-std"] edition = "2024" keywords = ["deadlock", "lock", "mutex", "no_std", "sync"] rust-version = "1.90" license = "MIT OR Apache-2.0" repository = "https://tangled.org/expede.wtf/surelock" authors = [ "Brooklyn Zelenka ", ] [dependencies] lock_api = { version = "0.4", default-features = false, optional = true } portable-atomic = { version = "1", optional = true, default-features = false } thiserror = { version = "2.0", default-features = false } [dev-dependencies] bolero = "0.13.4" serial_test = "3" spin = { version = "0.9", default-features = false, features = ["lock_api", "mutex", "spin_mutex"] } trybuild = "1" [features] default = ["std", "atomic-u64"] std = [] atomic-u64 = [] escape-hatch = [] lock-api = ["dep:lock_api"] levels-32 = [] levels-64 = [] portable-atomic = ["dep:portable-atomic"] critical-section = ["portable-atomic", "portable-atomic/critical-section"] cortex-m = ["critical-section"] [lints.rust] future_incompatible = { level = "warn", priority = -1 } let_underscore = { level = "warn", priority = -1 } missing_copy_implementations = "warn" missing_debug_implementations = "warn" missing_docs = "warn" nonstandard_style = { level = "warn", priority = -1 } rust_2021_compatibility = { level = "warn", priority = -1 } rust_2018_idioms = { level = "deny", priority = -1 } unreachable_pub = "deny" unused_extern_crates = "deny" [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" must_use_candidate = "warn" panic = "warn" todo = "warn" unneeded_field_pattern = "warn" unwrap_used = "warn" wildcard_enum_match_arm = "warn" all = { level = "deny", priority = -1 } cargo = { level = "deny", priority = -1 } multiple_crate_versions = "allow" # various transitive deps pedantic = { level = "deny", priority = -1 } [profile.release] codegen-units = 1 lto = "fat" opt-level = "z" panic = "abort" strip = "symbols" [profile.bench] codegen-units = 1 debug = true lto = "thin" opt-level = 3 strip = false