Skip to main content

spawn_plugin_process

Function spawn_plugin_process 

Source
pub async fn spawn_plugin_process(
    process_id: u64,
    command: String,
    args: Vec<String>,
    cwd: Option<String>,
    sender: Sender<PluginAsyncMessage>,
)
Expand description

Spawn an external process for a plugin

This function:

  1. Spawns the process asynchronously
  2. Captures all stdout and stderr
  3. Waits for process completion
  4. Sends results back via AsyncBridge with process_id for callback matching

§Arguments

  • process_id - Unique ID to match with callback
  • command - Command to execute (e.g., “git”)
  • args - Command arguments
  • cwd - Optional working directory
  • sender - Channel to send results back to main loop