Skip to main content

opencode_ctl_qwen_mcp/
main.rs

1//! `opencode-ctl-qwen-mcp`: the Qwen Code front of opencode-ctl-mcp. All behaviour lives in
2//! the `opencode-ctl` engine; this file only names the host, the product and the version.
3//!
4//! stdout belongs to the MCP protocol: `serve` logs only to its file log, and usage and
5//! configuration errors go to stderr.
6
7use opencode_ctl::cli::dispatch;
8use opencode_ctl::host::Host;
9
10#[tokio::main(flavor = "current_thread")]
11async fn main() {
12    let args: Vec<String> = std::env::args().skip(1).collect();
13    let code = dispatch(
14        Host::Qwen,
15        env!("CARGO_BIN_NAME"),
16        env!("CARGO_PKG_VERSION"),
17        std::env::args().next().as_deref(),
18        args,
19    )
20    .await;
21    if code != 0 {
22        std::process::exit(code);
23    }
24}