Skip to content

Commit fff20b7

Browse files
committed
docs(experimental): rust LSP multiplexer
1 parent e60a476 commit fff20b7

2 files changed

Lines changed: 44 additions & 1 deletion

File tree

docs/manual/src/experimental/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@
66
77
## Available Features
88

9-
- [Tool Description Diet & Tool Guide Resource](./tool-description-diet.md) — caps tool descriptions at 300 chars, exposes long-form notes via `doc://codescout-tool-guide`.
9+
- [MCP resources, tool diet, progress notifications](./mcp-resources.md) — token-efficient resource sharing, short descriptions with on-demand guides, and progress notifications for long operations.
10+
- [Project hints in `activate_project`](./project-hints.md) — manifest-derived primary language, entry points, and build commands surfaced in the activation response so agents have context without running onboarding.
11+
- [Rust LSP multiplexer](./mux-rust.md) — share a single `rust-analyzer` process across multiple `codescout` instances on the same project, eliminating stale-hover / stale-goto bugs.
12+
- [Tool usage doctor](./tool-usage-doctor.md)`doctor://tool-usage` MCP resource reporting per-tool call counts, error/overflow rates, and prune candidates for the next prompt-surface review.
13+
- [Cross-process write serialization](./cross-process-write-serialization.md) — advisory file lock serializes write-tool calls across concurrent codescout instances on the same project; contention returns a recoverable error instead of corrupting files.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Rust LSP multiplexer
2+
3+
> ⚠ Experimental — may change without notice.
4+
5+
## What it does
6+
7+
When two `codescout` instances open the same Rust project, they now share a
8+
single `rust-analyzer` process via the existing LSP multiplexer (first used
9+
for `kotlin-lsp`). This eliminates the stale-hover / stale-goto bug that
10+
appeared after a write in instance A was not reflected in instance B.
11+
12+
## Footprint
13+
14+
- One `rust-analyzer` per `(project-root)` across all `codescout` instances
15+
on the machine.
16+
- Idle-shutdown after 180 seconds with no connected clients.
17+
- Memory saved: one full `rust-analyzer` (2–4 GB on a medium Cargo
18+
workspace) per extra `codescout` instance.
19+
20+
## Opt out
21+
22+
Add to `.codescout/project.toml`:
23+
24+
```toml
25+
[lsp.rust]
26+
mux = false
27+
```
28+
29+
Then `/mcp` restart. Codescout will fall back to spawning a dedicated
30+
`rust-analyzer` per instance, as before.
31+
32+
## Known limits
33+
34+
- Unix only (the mux is `#[cfg(unix)]`).
35+
- `rust-analyzer` must be on `PATH`.
36+
- If two clients connect before `rust-analyzer` completes initialization,
37+
the second client waits on a 5-retry / 1-second backoff. No-op
38+
behaviourally; you may see a brief startup delay under heavy
39+
concurrency.

0 commit comments

Comments
 (0)