qsu

qsu
Login

Portable service utilities with an (opinionated) service wrapper runtime.

The "What?"

The qsu ("kazoo") crate is a:

qsu is somewhat opinionated and is designed to make certain types of server software easier to write, but it does not aim to cover every use-case.

The "Why?"

The original motivating factors for this crate was the observation that a fair amount of time was spent on making server applications work in different service and non-service environments. This time could be better spent working on the actual server application code.

The "How?"

See design notes for a high-level overview of how the qsu wrapper runtime is implemented.

What qsu is opinionated about

It should be noted that the word opinionated does not necessary mean that qsu is forever locked to these behaviors -- it's just to say what the current version does.

All platforms

Unixy platforms and running as a foreground process in Windows

Unixy platforms

Windows foreground process

Windows Service

When to use it, and when not to use it

To be frank, if you're writing a systemd-only service, then the value of using qsu is negligible (or it might even be wasteful to pull in qsu). The benefits of using qsu will be noticed mostly when targeting the Windows Services subsystem. But mostly the benefits become apparent when targetting multiple service subsystems in the same project, and wanting to have a similar API when developing non-async and async services.

General tips

Feature labels in documentation

The crate's documentation uses automatically generated feature labels, which currently requires nightly featuers. To build the documentation locally use:

RUSTFLAGS="--cfg docsrs" RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features

Known limitations

Examples

Change log

The details of changes can always be found in the timeline, but for a high-level view of changes between released versions there's a manually maintained Change Log.

Project status

This crate is a work-in-progress -- still in early prototyping stage. This means potentially significant API instability between versions and incomplete, or even incorrect, documentation.

It is recommended that projects wanting to use qsu at this point use the tests and examples for up-to-date information on how to use the crate.