interface process {
use common.{env-vars};
record command {
/// bin name
program: string,
/// 当前目录
current-dir: option<string>,
/// 参数
args: option<list<string>>,
/// 环境变量
envs: option<env-vars>,
}
record output {
/// 退出码
status: option<s32>,
/// 输出
stdout: list<u8>,
/// 错误
stderr: list<u8>,
}
/// 执行命令
run-command: func(cmd: command) -> result<output, string>;
}