Skip to content

Commit cd1cfb2

Browse files
committed
feat(runtime-host): add Windows Task Scheduler lifecycle
Generated-by: OpenAI Codex
1 parent 0222ca8 commit cd1cfb2

21 files changed

Lines changed: 1416 additions & 64 deletions

native/runtime-host-peer/Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

native/runtime-host-peer/Cargo.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,19 @@ unsigned-varint = "0.8"
5858
# Keep this immutable until an official release contains those fixes.
5959
webrtc = { git = "https://github.com/webrtc-rs/webrtc", rev = "e132552fc67b84c30e63c5ce916a9a63e2484b6f" }
6060

61+
[target.'cfg(windows)'.dependencies]
62+
windows = { version = "0.62.2", features = [
63+
"Win32_Foundation",
64+
"Win32_Security",
65+
"Win32_System_Com",
66+
"Win32_System_Diagnostics_ToolHelp",
67+
"Win32_System_JobObjects",
68+
"Win32_System_Ole",
69+
"Win32_System_TaskScheduler",
70+
"Win32_System_Threading",
71+
"Win32_System_Variant",
72+
] }
73+
6174
[build-dependencies]
6275
napi-build = "2.4"
6376

native/runtime-host-peer/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,18 @@
2020
mod bindings;
2121
mod engine;
2222
mod webrtc_direct;
23+
#[cfg(target_os = "windows")]
24+
mod windows_lifecycle;
2325

2426
pub use bindings::{
2527
ConfigurePeerTransitOptions, ConnectPeerOptions, PeerConnectivitySnapshot, PeerEndpoint,
2628
PeerIdentitySignature, PeerReachabilitySnapshot, PeerStream, PeerTransitRelayCandidate,
2729
PeerTransitSnapshot, StartPeerEndpointOptions, ensure_peer_identity, sign_peer_identity,
2830
start_peer_endpoint, verify_peer_identity,
2931
};
32+
#[cfg(target_os = "windows")]
33+
pub use windows_lifecycle::{
34+
WindowsTaskStatus, own_current_process_tree, windows_task_activate, windows_task_converge,
35+
windows_task_probe, windows_task_retire, windows_task_status, windows_task_uninstall,
36+
windows_task_verify,
37+
};

0 commit comments

Comments
 (0)