Crate qsu

Source
Expand description

qsu is a set of tools for integrating a server application against a service subsystem (such as Windows Services, systemd, or launchd).

It offers a thin runtime wrapper layer with the purpose of abstracting away differences between service subsystems (and also provides the same interface when running the server application as a foreground process). More information about the wrapper runtime can be found in the rt module documentation.

In addition qsu offers helper functions to register/deregister an executable with the system’s service subsystem. These are documented installer module.

And finally it offers an argument parser to offer basic service registration/deregistration and running using a consistent command line interface. These are documented in the argp module.

§Features

FeatureFunction
clapEnable clap (argument parser) integration.
installerTools for registering/deregistering services.
rtService wrapper (enabled by default).
systemdsystemd integration support.
tokioTokio server application type support.
rocketRocket server application type support.

In addition there’s a special wait-for-debugger feature that is only used on Windows. It will make the service runtime halt and wait for a debugger to attach just before starting the Windows Service runtime. Once a debugger has attached, it will voluntarily trigger a breakpoint.

Re-exports§

pub use tokio;
pub use rocket;
pub use log;
pub use tracing;
pub use clap;clap

Modules§

argpclap
Helpers for integrating clap into an application using qsu.
installerinstaller
Helpers for installing/uninstalling services.
rtrt
Server application wrapper runtime.

Structs§

LumberJack
Logging and tracing initialization.

Enums§

CbErrrt or installer
Errors that can be returned from functions that call application callbacks.
Error
Errors that qsu will return to application.

Functions§

default_service_name
Attempt to derive a default service name based on the executable’s name.

Attribute Macros§

async_trait