mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
Define the code-mode host gRPC protocol (#37510)
## What changed - Add the `codex.code_mode.v1` protobuf API for managing code-mode sessions, executions, waits, tool callbacks, notifications, and content results. - Generate and export the Rust client/server bindings with `tonic` under Cargo. - Add Bazel protobuf targets and a `prost` toolchain that uses the workspace's Rust runtime versions. GitOrigin-RevId: 51d9d044e01dab2f4d25ab79aa7a52585485eee3
This commit is contained in:
committed by
copyberry
parent
4ca25a2c4e
commit
8073dbb20b
@@ -0,0 +1,17 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
println!("cargo:rustc-check-cfg=cfg(codex_bazel)");
|
||||
println!("cargo:rerun-if-changed=src/grpc");
|
||||
|
||||
let mut config = tonic_prost_build::Config::new();
|
||||
config.protoc_executable(protoc_bin_vendored::protoc_bin_path()?);
|
||||
let proto_files = glob::glob("src/grpc/*.proto")?.collect::<Result<Vec<_>, _>>()?;
|
||||
|
||||
tonic_prost_build::configure()
|
||||
.build_client(/*enable*/ true)
|
||||
.build_server(/*enable*/ true)
|
||||
.compile_with_config(config, &proto_files, &[PathBuf::from("src/grpc")])?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user