symposium_rust_analyzer/
lib.rs

1mod failed_obligations;
2mod lsp_client;
3mod rust_analyzer_mcp;
4
5use anyhow::Result;
6pub use rust_analyzer_mcp::{
7    BridgeState, BridgeType, SERVER_ID, build_server, with_bridge_and_document,
8};
9use sacp::ProxyToConductor;
10use sacp::component::Component;
11use sacp::link::ConductorToProxy;
12
13#[derive(Default)]
14pub struct RustAnalyzerProxy {
15    pub workspace_path: Option<String>,
16}
17
18impl Component<ProxyToConductor> for RustAnalyzerProxy {
19    async fn serve(self, client: impl Component<ConductorToProxy>) -> Result<(), sacp::Error> {
20        ProxyToConductor::builder()
21            .name("rust-analyzer-proxy")
22            .with_mcp_server(build_server(self.workspace_path).await?)
23            .serve(client)
24            .await
25    }
26}