You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- reworded the first sentences to make it clearer
- removed project structure as requested
- removed sentence about rust installation
- replaced `cargo run` with respective command
`rust-code-analysis-web` is a web server that facilitates the analysis of source code through a RESTful API. It is part of the rust-code-analysis suite and allows developers to remotely interact with the code analysis features provided by the library.
3
+
`rust-code-analysis-web` is a web server that provides source code analysis capabilities via a RESTful API. It enables developers to interact with the code analysis functionality from the rust-code-analysis suite through HTTP requests.
4
4
5
5
## Features
6
6
7
-
-**Comment Removal**: Removes comments from source code to produce a clean version.
8
-
-**Function Spans**: Retrieves the start and end lines of functions in the provided source code.
9
-
-**Metrics Calculation**: Computes various static analysis metrics for the source code.
7
+
-**Comment Removal**: Removes comments from source code to provide a cleaner version of the code.
8
+
-**Function Spans**: Retrieves the start and end lines of functions in the given source code.
9
+
-**Metrics Calculation**: Computes static analysis metrics for the source code.
10
10
11
-
## Project Structure
12
-
13
-
```sh
14
-
rust-code-analysis-web
15
-
├── Cargo.toml # Project metadata, dependencies, and build configuration
16
-
└── src
17
-
├── bin/
18
-
│ └── rust-code-analysis-web.rs # Entry point for running the web server with CLI options
19
-
├── web/
20
-
│ ├── comment.rs # Logic for handling requests related to removing comments from source code
21
-
│ ├── function.rs # Logic for extracting and returning function spans from the source code
22
-
│ ├── metrics.rs # Logic for computing and returning code metrics based on the source code
23
-
│ ├── mod.rs # Module declarations and routing between web modules
24
-
│ └── server.rs # Actix web server setup, route definitions, and main server handler logic
25
-
└── lib.rs # Main library file, sets up the module imports and starts the server
26
-
```
11
+
Refer to the REST API documentation for detailed information about the available endpoints and parameters.
27
12
28
13
## Installation
29
14
30
-
To use `rust-code-analysis-web`, you need to have Rust installed on your system.
31
-
32
-
Clone the repository and run the following command:
15
+
Clone the repository and build the project:
33
16
34
17
```sh
35
18
cd rust-code-analysis-web/
36
-
cargo build --debug # or cargo build --release
19
+
cargo build
37
20
```
38
21
39
22
## Usage
40
23
41
24
Run the server by specifying the host and port:
42
25
43
26
```sh
44
-
cargo run -- [OPTIONS]
27
+
rust-code-analysis-web [OPTIONS]
45
28
```
46
29
47
30
### Available Options
@@ -52,10 +35,10 @@ cargo run -- [OPTIONS]
52
35
-`-h, --help`: Show help information.
53
36
-`-v, --version`: Show version information.
54
37
55
-
# Examples
38
+
##Examples
56
39
57
40
To start the server on a specific host and port:
58
41
59
42
```sh
60
-
cargo run -- --host <HOST> --port <PORT> -j <NUM_JOBS>
0 commit comments