Inside a development tool that I want to develop, I need to check that some text is valid Rust code, and, in case it is not, I want to get the generated compilation error. To do that, I can save that text into a file, and then run the command "cargo check". Though, it has not optimal performance, as it reads and writes files.
Is there any tool that performs such analysis receiving input from stdin or from a socket, and emitting output on stdout or on a socket, without touching the disk?
I know there is a tool named "Rust Language Server". Though, its documentation is not clear regarding how to send some Rust code to it, and receiving the corresponding error messages.