Expand description
Per-OS boot autostart for the runpm daemon (Phase 4 of #222 — #427).
Each OS implementation exposes the same trio:
install(daemon_binary)— write the unit/plist/task and arm the init system. Returns the unit path that was written.uninstall()— disarm the init system and remove the unit.render_unit(daemon_binary)— render the unit text without touching the filesystem. Used by fixture tests and byinstall.
Backends:
- Linux: systemd user unit at
$XDG_CONFIG_HOME/systemd/user/runpm-daemon.service. - macOS: launchd user agent at
~/Library/LaunchAgents/com.zackees.runpm-daemon.plist. - Windows: Task Scheduler ONLOGON task named
runpm-daemonvia theschtasksCLI.
Tests never call install — they assert against render_unit output
to avoid mutating the runner’s init system.
Modules§
- linux
- Linux backend: systemd user unit at
$XDG_CONFIG_HOME/systemd/user/runpm-daemon.service.
Structs§
- Unit
Path - Typed wrapper around the path where the unit/plist/task was written.
Wrapped so callers can’t accidentally pass it as a generic
PathBufand lose the “this is the autostart artifact” intent.
Enums§
- Boot
Autostart Error - Anything that can go wrong installing/uninstalling boot autostart.
Functions§
- install
- Install boot autostart for the running-process daemon. Returns the path where the unit/plist/task was written.
- render_
unit - Render the unit/plist/task text for the current OS without touching
the filesystem. Test seam used by
tests/runpm_boot_autostart_fixtures.rs. - uninstall
- Uninstall boot autostart for the running-process daemon.