run

Function run 

Source
pub async fn run(args: Vec<String>) -> Result<RunResult>
Expand description

Execute ggen CLI with provided arguments

This is the low-level API that all other functions use internally. Prefer using the high-level wrapper functions for better ergonomics.

§Arguments

  • args - Command-line arguments (without the ‘ggen’ binary name)

§Returns

RunResult containing exit code and captured stdout/stderr

§Example

const result = await run(['--version']);
console.log(result.stdout);