Files
craft-libs/crates/xtask/Cargo.toml
T
dotCooCoo d04218c1ce craft-xtask: open lock and owner files on Unix without waiting on a FIFO
Owner files are opened with O_NOFOLLOW and O_NONBLOCK, and the opened
handle must be a regular file with one name. An entry replaced by a link
or a FIFO after a check can no longer block holders() or the wait in
acquire(). Lock files are opened with O_NONBLOCK: holders() treats a FIFO
lock file as a free slot, and try_acquire() returns a lock error for it.
2026-11-17 04:36:06 -08:00

32 lines
1.1 KiB
TOML

[package]
name = "craft-xtask"
version.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
description = "Library for the Craft apps' cargo xtask binaries: the gate's step runner, an optional slot lock shared across processes and a per-step JSON report"
[lints]
workspace = true
[features]
default = []
# One-at-a-time (or N-at-a-time) gate runs per machine, through file locks in a caller-chosen folder.
lock = ["dep:libc"]
# The per-step JSON report, replaced atomically.
report = ["dep:serde_json", "dep:craft-atomic"]
# `cargo xtask stats`: files, lines and tests of Rust per workspace crate, read from `cargo metadata`.
stats = ["dep:serde_json"]
[dependencies]
craft-atomic = { workspace = true, optional = true }
serde_json = { workspace = true, optional = true }
[target.'cfg(unix)'.dependencies]
# O_NONBLOCK and O_NOFOLLOW for lock and owner opens that must not wait on a FIFO or follow a symlink. Constants only.
libc = { version = "0.2", optional = true }
[dev-dependencies]
tempfile = "3"