12 unstable releases (5 breaking)

0.26.1 Oct 6, 2025
0.26.0 Sep 4, 2025
0.25.0 Jul 28, 2025
0.24.0 May 15, 2025
0.7.0 Apr 1, 2021

#491 in Windows APIs

29 downloads per month
Used in dpibreak

MIT/Apache

18KB
279 lines

Windows services

The windows-services crate provides a simple and safe way to implement Windows services in Rust.

Start by adding the following to your Cargo.toml file:

[dependencies.windows-services]
version = "0.26"

Use the Windows services support as needed. Here is how you might write a simple Windows services process:

fn main() {
    windows_services::Service::new()
        .can_pause()
        .can_stop()
        .run(|service, command| {
            // Respond to service commands...
        })
        .unwrap();
}

Dependencies