Skip to content

Latest commit

Β 

History

History
30 lines (20 loc) Β· 1.07 KB

File metadata and controls

30 lines (20 loc) Β· 1.07 KB

windows-services

A simple, safe way to implement Windows services in Rust.

windows-services lets you write a Windows service process with a builder. Use Service::new to declare which control commands the service accepts (can_stop, can_pause, …), then run to hand control to the service control manager. Your closure receives the service handle and each incoming command.


Internal documentation

The remainder of this page covers how the crate is built and maintained. It is for contributors and is not needed to use windows-services.

How it's built

src/bindings.rs is generated by tool_bindings from crates/tools/bindings/src/services.txt; the service runtime and dispatch glue are hand-written.

Testing

Run cargo test -p windows-services; see also the workspace test crates.