[package]
name = "oncelock"
description = "A fast and simple implementation of OnceLock"
version = "0.1.0-alpha.0"
license = "MIT OR Apache-2.0"
authors = ["Techcable <git@techcable.net>"]
repository = "https://github.com/Techcable/oncelock.rs"
readme = "README.md"
rust-version = "1.31"
edition = "2018"
categories = ["concurrency", "rust-patterns", "memory-management", "no-std", "no-std::no-alloc"]
keywords = ["lazy", "static", "oncecell", "oncelock"]
[build-dependencies]
rustversion = "1"
[dependencies]
rustversion = "1"
parking_lot_0_12 = { package = "parking_lot", version = "0.12", optional = true }
spin_0_10 = { package = "spin", version = "0.10", optional = true, features = ["once"] }
spin_0_9 = { package = "spin", version = "0.9", optional = true, features = ["once"] }
[features]
default = ["std"]
std = ["alloc", "std-sync"]
alloc = []
parking_lot_v0_12 = ["parking_lot_0_12"]
std-sync = []
spin_v0_10 = ["spin_0_10"]
spin_v0_9 = ["spin_0_9"]
[workspace.lints.rust]
unsafe-op-in-unsafe-fn = "deny"
[lints.clippy]
pedantic = { level = "warn", priority = -1 }
cargo = { level = "warn", priority = -1 }
cast-possible-truncation = "deny"
cast-possible-wrap = "deny"
cast-precision-loss = "deny"
cast-sign-loss = "deny"
char-lit-as-u8 = "deny"
cast-ptr-alignment = "deny"
fn-to-numeric-cast = "deny"
fn-to-numeric-cast-any = "deny"
fn-to-numeric-cast-with-truncation = "deny"
cast-lossless = "allow"
ptr-as-ptr = "allow"
alloc-instead-of-core = "deny"
std-instead-of-alloc = "deny"
std-instead-of-core = "deny"
undocumented-unsafe-blocks = "deny"
missing-safety-doc = "deny"
items-after-statements = "allow"
missing-panics-doc = "allow"
must-use-candidate = "allow"
assertions-on-constants = "allow"