2 releases
Uses new Rust 2024
| 0.1.1 | Apr 23, 2026 |
|---|---|
| 0.1.0 | Mar 8, 2026 |
#1 in #ipc-service
110KB
2.5K
SLoC
Tsunagu (繋ぐ) — service/daemon IPC framework.
Provides reusable patterns for daemon lifecycle management:
SocketPath: XDG-compliant Unix socket and PID file path resolutionDaemonProcess: PID file management, staleness detection, and cleanupHealthCheck: standardized health/liveness/readiness responses
Quick Start
use tsunagu::{DaemonProcess, HealthCheck, SocketPath};
// Resolve paths for your app
let sock = SocketPath::for_app("myapp");
let pid = SocketPath::pid_file("myapp");
assert!(sock.to_string_lossy().contains("myapp"));
// Health check response
let hc = HealthCheck::healthy("myapp", "0.1.0");
assert!(hc.is_healthy());
Tsunagu (繋ぐ)
Service/daemon IPC framework for pleme-io applications. Provides reusable patterns for client-daemon communication so every app with a background service shares the same lifecycle management.
Components
| Module | Purpose |
|---|---|
daemon |
DaemonProcess — PID file management, process lifecycle |
socket |
SocketPath — XDG-compliant Unix socket path resolution |
health |
HealthCheck — standardized liveness/readiness probes |
error |
Unified error type |
Usage
[dependencies]
tsunagu = { git = "https://github.com/pleme-io/tsunagu" }
use tsunagu::{DaemonProcess, SocketPath};
let daemon = DaemonProcess::new("myapp");
if !daemon.is_running() {
daemon.write_pid()?;
// start gRPC server on daemon.socket_path()
}
Build
cargo build
cargo test --lib
Dependencies
~7–13MB
~160K SLoC