2 releases

Uses new Rust 2024

new 0.1.1 Apr 14, 2025
0.1.0 Apr 14, 2025

#654 in Concurrency

27 downloads per month
Used in daemonbit

MIT/Apache

24KB
432 lines

Support: GitHub SponsorsBuy Me a CoffeeKo-fi
Manifesto: I don’t have lifetime for your bullshit

Cross-platform daemon lifecycle primitives

crates.io docs.rs Build status license: MIT OR Apache-2.0 Project status: WIP

⚠️ Warning: This project is in early development.


This crate provides the foundational primitives for managing cross-platform daemon lifecycles, with strict support for:

  • Lock enforcement

    • lockfile-based locking on Unix (using flock)
    • mutex-based locking on Windows (using Win32 named mutexes)
  • Runtime directories

    • Per-scope (global/local) runtime directory discovery and fallback
    • Cleanup on drop for temporary directories

The following major components are planned:

  • Cross-platform IPC

    • Unix Domain Socket (UDS)
    • Named Pipe on Windows
  • System integration

    • systemd
    • Windows SCM

These will build on the current abstractions, enabling full lifecycle management of daemons across platforms.


MSRV Policy

This crate's Minimum Supported Rust Version (MSRV) is 1.85, as required by the 2024 edition. Changes to the MSRV will be accompanied by a minor version bump.

The MSRV policy only takes effect beyond 1.85. Once applicable, it will be bound by:

min(sid, stable - 3)

Where sid is the current version of rustc provided by Debian Sid, and stable is the latest stable version of Rust. This bound may be broken in case of a major ecosystem shift or a security vulnerability.


License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~2–31MB
~505K SLoC