spawn-process

Resolve binaries and run subprocess commands using the vite_command crate in Rust.

3|1|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/wfvue/SynapSH --skill spawn-process
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spawn-process
Source: https://github.com/wfvue/SynapSH/tree/main/.agent/skills/spawn-process
Command: npx skills add https://github.com/wfvue/SynapSH --skill spawn-process

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Subprocess execution in Rust can be error-prone when using direct APIs like std::process::Command or tokio::process. This skill guides adopting the vite_command crate to reliably resolve binaries, prepare commands, and execute them with predictable environments.

Core Features & Use Cases

  • Resolve binaries portably across platforms via vite_command::resolve_bin.
  • Build and configure commands with vite_command::build_command and shell commands with vite_command::build_shell_command.
  • Run end-to-end with vite_command::run_command to combine resolution, building, and execution.
  • Use cases include running linters, build tools, or any external program with controlled cwd and environment.

Quick Start

Spawn a subprocess by resolving the binary with vite_command::resolve_bin and then execute it with vite_command::build_command.

Frequently Asked Questions about spawn-process

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I spawn a subprocess reliably in Rust across different platforms?

To spawn a subprocess reliably in Rust, use the vite_command crate to resolve binaries portably and execute commands with predictable environments and stdio behavior across platforms. It wraps resolution, building, and execution into safe patterns.

What's the best way to resolve and run external binaries in Rust instead of using std::process::Command?

Resolving and running external binaries is best handled by using vite_command::resolve_bin to locate the executable portably, then vite_command::build_command to configure and execute it with controlled working directory and environment variables.

How do I build and execute shell commands in Rust with proper error handling?

Building and executing shell commands in Rust is done through vite_command::build_shell_command, which prepares the invocation safely. You then run it end-to-end with vite_command::run_command, ensuring predictable stdio behavior and proper error handling throughout.

Why does spawning a subprocess with std::process::Command fail to find binaries on different platforms?

Spawning a subprocess with std::process::Command can fail because direct APIs lack portable binary resolution. The vite_command crate solves this by providing resolve_bin, which locates executables consistently across platforms before building and running the command.

Can I use vite_command to run linters and build tools with a custom working directory in Rust?

Yes, you can use vite_command to run linters and build tools with a custom working directory in Rust. The crate allows configuring commands with controlled cwd and environment variables, making it suitable for executing any external program predictably.

Do I need to add vite_command as a dependency to spawn subprocesses in my Rust project?

Yes, you need to add vite_command as a dependency in your Rust project to use its subprocess execution features. The skill enforces this dependency to ensure you have access to resolve_bin, build_command, and run_command for reliable execution.