mirror of
https://github.com/openai/codex.git
synced 2026-04-28 02:11:08 +03:00
Restore the process RPC client/server implementation on top of the initialize-only base.\n\nCo-authored-by: Codex <noreply@openai.com>
24 lines
605 B
Rust
24 lines
605 B
Rust
use clap::Parser;
|
|
use codex_exec_server::ExecServerTransport;
|
|
|
|
#[derive(Debug, Parser)]
|
|
struct ExecServerArgs {
|
|
/// Transport endpoint URL. Supported values: `stdio://` (default),
|
|
/// `ws://IP:PORT`.
|
|
#[arg(
|
|
long = "listen",
|
|
value_name = "URL",
|
|
default_value = ExecServerTransport::DEFAULT_LISTEN_URL
|
|
)]
|
|
listen: ExecServerTransport,
|
|
}
|
|
|
|
#[tokio::main]
|
|
async fn main() {
|
|
let args = ExecServerArgs::parse();
|
|
if let Err(err) = codex_exec_server::run_main_with_transport(args.listen).await {
|
|
eprintln!("{err}");
|
|
std::process::exit(1);
|
|
}
|
|
}
|