duende-platform
Platform adapters for the Duende daemon framework.
Overview
Platform-specific implementations for spawning, signaling, and monitoring daemons across:
- Linux (systemd): Service units with cgroup resource control
- macOS (launchd): Property lists with keep-alive support
- Container (Docker/OCI): Container runtime integration
- pepita (MicroVM): Virtio-vsock communication
- WOS (WebAssembly OS): Process scheduling with priority levels
- Native (fallback): Direct process spawning
Usage
use ;
// Auto-detect platform
let platform = detect_platform;
// Create appropriate adapter
let adapter = new;
// Spawn daemon
let handle = adapter.spawn.await?;
// Signal daemon
adapter.signal.await?;
Memory Locking (DT-007)
Prevents swap deadlock for daemons serving as swap devices:
use ;
// Lock all current and future memory allocations
let result = lock_daemon_memory?;
assert!;
Feature Flags
| Feature | Description |
|---|---|
native (default) |
Native process adapter |
linux |
systemd integration |
macos |
launchd integration |
container |
Docker/OCI support |
pepita |
MicroVM support |
wos |
WebAssembly OS support |
License
MIT OR Apache-2.0