procref 0.1.0

Cross-platform process reference counting for shared service lifecycle management
Documentation
//! Platform-specific reference counter implementations.
//!
//! Each platform uses a kernel-managed mechanism that automatically
//! decrements the count when a process crashes.

#[cfg(target_os = "linux")]
mod linux;

#[cfg(target_os = "macos")]
mod macos;

#[cfg(target_os = "windows")]
mod windows;

// Re-export the platform-specific implementation
#[cfg(target_os = "linux")]
pub use linux::LinuxRefCounter as PlatformRefCounter;

#[cfg(target_os = "macos")]
pub use macos::MacOSRefCounter as PlatformRefCounter;

#[cfg(target_os = "windows")]
pub use windows::WindowsRefCounter as PlatformRefCounter;

// Fallback for unsupported platforms (compile-time error)
#[cfg(not(any(target_os = "linux", target_os = "macos", target_os = "windows")))]
compile_error!("procref only supports Linux, macOS, and Windows");