It is possible to run rust-code-analysis-cli as a
HTTP service using
REST API to share data between client and server.
We will use the port
9090 to show you the possible ways to
interact with the server.
rust-code-analysis-cli can act as a server running on your
at a specific port.
rust-code-analysis-cli --serve --port 9090
--port option sets the port used by the server. One possible value
If you want to ping the server, make a
GET request at this
To get metrics formatted as a
json file, make a
POST request at this
filename parameter represents the path to the source file to be analyzed,
unit is a boolean value that can assume only
1. The latter
tells rust-code-analysis-cli to consider only top-level metrics, while the
former returns detailed metrics for all classes, functions, nested functions,
and other sub-spaces.