uni_service
A crate for for building cross platform OS services
Install
cargo add uni_service
# or
cargo add uni_service -F tokio
Features
- Portable cross platform services (Windows, macOS, Linux and other UNIX-like systems)
- A single user supplied function is all that is required
- Synchronous and asynchronous services (see
axumexample) - Any service can be run interactively from the CLI or in service mode
- Works with the regular OS service manager, and pairs well with
uni_service_manager - Minimal dependencies
- No
unsafe
Example
The hello_service function below is the service, the rest is just boilerplate.
use Receiver;
use ;
Status
This is currently beta, however, I am using this myself, so it will become production quality at some point.
Contributions
Contributions are welcome as long they align with my vision for this crate.