universal-service 0.1.0

A Rust crate that provides building blocks for creating service binaries across operating system platforms.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
cargo build --example service

$name = "testservice"

Get-Service -Name $name -ErrorAction SilentlyContinue | Remove-Service
New-Service -Name $name -BinaryPathName "$(Get-Location)\target\debug\examples\service.exe"
Start-Service -Name $name
Start-Sleep -Milliseconds 500
Stop-Service -Name $name
Remove-Service -Name $name

Write-Output "> output"
Get-Content C:\Windows\Temp\test.txt