windows-spawn 0.1.0

Windows process creation with explicit handle, Job, mitigation, ConPTY, and child ownership
Documentation
  • Coverage
  • 100%
    78 out of 78 items documented3 out of 3 items with examples
  • Size
  • Source code size: 245.61 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.69 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 13s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • P4suta/windows-spawn
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • P4suta

windows-spawn

CI

Windows process creation with explicit handle transfer, ordered Job attachment, mitigation policies, ConPTY, and suspended inspection.

Use and platform

Use std::process::Command for portable child processes. Use this crate for CreateProcessW features that require explicit ownership and rollback.

The crate requires Windows 10 version 1809 or later and Rust 1.75 or later. Non-Windows targets expose no public API.

This project is not affiliated with Microsoft or the windows-rs project. The windows- prefix describes the target platform, not the publisher.

Installation

cargo add windows-spawn

Minimal example

use windows_spawn::{Command, DropPolicy, SpawnOptions};

let mut command = Command::new(r"C:\Windows\System32\cmd.exe");
command.args(["/D", "/S", "/C"]).raw_arg("echo hello");

let output = command.output_with(
    SpawnOptions::new().drop_policy(DropPolicy::KillTree),
)?;
assert!(output.status.success());
# Ok::<(), std::io::Error>(())

Documentation

License

Apache-2.0 OR MIT.