Skip to content

feat(service): support native service management on Windows, Linux, and macOS #105

Description

@Karib0u

Purpose

Provide the same service-management surface on all supported platforms while keeping platform-specific implementation details isolated.

CLI Surface

rustinel service install
rustinel service uninstall
rustinel service start
rustinel service stop
rustinel service restart
rustinel service status

Scope

  • Add a shared internal service backend interface.
  • Preserve and improve the Windows Service Control Manager implementation.
  • Add Linux systemd support.
  • Add macOS launchd system daemon support.
  • Add restart and status.
  • Use canonical managed binary and configuration paths.
  • Validate that required files exist before service installation.
  • Make install and uninstall idempotent.
  • Keep platform-specific code isolated.

Service Install Requirements

  • Register the native service definition.
  • Use the managed binary and managed configuration paths.
  • Avoid downloading rules.
  • Avoid overwriting user configuration.
  • Avoid silently copying an executable from a temporary or downloads directory.

Service Uninstall Requirements

  • Stop and unregister the service.
  • Preserve configuration, rules, logs, and state by default.
  • Avoid acting as a full data-purge command.

Normalized Status Values

not-installed
stopped
starting
running
failed
unknown

Acceptance Criteria

  • install, uninstall, start, stop, restart, and status work on all supported platforms.
  • Service definitions use canonical managed paths.
  • install does not download rules or overwrite configuration.
  • uninstall preserves user data.
  • status reports meaningful normalized states.
  • Generated systemd and launchd definitions are covered by tests.
  • Windows service behavior is preserved behind the shared interface.
  • Mock backend tests cover success, failure, and unknown states.

Dependencies

Priority

P0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestp0Must ship in next cycle

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions