Add bounded standalone connector daemon
This commit is contained in:
parent
f64a52b6aa
commit
07de82597d
7 changed files with 853 additions and 15 deletions
16
src/main.rs
Normal file
16
src/main.rs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
use std::path::PathBuf;
|
||||
|
||||
fn main() {
|
||||
let mut args = std::env::args_os().skip(1);
|
||||
let config = match (args.next(), args.next(), args.next()) {
|
||||
(Some(flag), Some(path), None) if flag == "--config" => PathBuf::from(path),
|
||||
_ => {
|
||||
eprintln!("usage: codex-connector --config PATH.cc");
|
||||
std::process::exit(2);
|
||||
}
|
||||
};
|
||||
if let Err(error) = codex_connector::serve(&config) {
|
||||
eprintln!("codex-connector stopped: {error}");
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue