Shawl

Shawl is a service wrapper for Windows programs, written in Rust. You can bundle Shawl with your project, set it as the entry point of the service, and simply pass the command for it to run via CLI, without your program needing to be service-aware. Shawl's own options and your command are separated by --:

shawl -- my-app.exe --foo bar shawl --restart-ok --no-restart-err --stop-timeout 5000 -- my-app.exe

Shawl will inspect the state of your program in order to report the correct status to Windows:

It differs from existing solutions like WinSW and NSSM in that their interfaces rely on running a special install command to prepare the service, which means, for example, that you have to run a CustomAction if you're installing with an MSI. With Shawl, you can configure the service however you want, such as with the normal ServiceInstall in an MSI, because Shawl doesn't have any special setup of its own.

Prebuilt binaries are available on the releases page.

Development

Commands assume you are using Git Bash on Windows: