Crates.io | windows-services |
lib.rs | windows-services |
version | 0.26.0 |
created_at | 2021-04-01 18:29:16.792069+00 |
updated_at | 2025-09-04 20:21:23.280102+00 |
description | Windows services |
homepage | |
repository | https://github.com/microsoft/windows-rs |
max_upload_size | |
id | 376892 |
size | 28,885 |
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();
}