To issue LSP requests, simply run
rust-analyzer and send the requests to its stdin.
Hyeonu linked to the LSP specification above, which documents the format of the RPC requests that you can send over stdio. For example, here's a minimal
Note that lines must be terminated by
\r\n, so you probably can't just paste this into your terminal. Also, the
Content-Length header is mandatory. Rather than writing to stdin directly, I imagine you'll want to write a small program to handle at least some of the encoding details.