1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
[]
= "Rust_Grammar"
= "2.2.0"
= "2021"
= ["Eeman Majumder <eeman.majumder@gmail.com>"]
= """
A comprehensive, production-ready text analysis library and REST API server.
Features 19+ professional writing analysis tools including grammar checking,
readability metrics, passive voice detection, style scoring, and more.
Provides both CLI and REST API interfaces with 6 specialized endpoints.
"""
= "MIT"
= "https://github.com/Eeman1113/rust_grammar"
= "https://github.com/Eeman1113/rust_grammar"
= "https://docs.rs/Rust_Grammar"
= "README.md"
= ["text-analysis", "nlp", "grammar-checker", "readability", "writing-assistant"]
= ["command-line-utilities", "text-processing", "web-programming::http-server"]
= [
"/tests/data/*",
".github/*",
"*.log",
"logs/*",
".env",
".env.*",
]
# Minimum supported Rust version
= "1.75"
# ==============================================================================
# BINARIES
# ==============================================================================
# Main CLI application
[[]]
= "text-analyzer"
= "src/main.rs"
# Basic API server with single /analyze endpoint
# Run with: cargo run --release --features server --bin api-server
[[]]
= "api-server"
= "src/bin/api-server.rs"
= ["server"]
# Enhanced API server with 6 endpoints:
# POST /analyze - Full analysis with scores and issues
# POST /score - Scores only with ideal values and guidance
# POST /sentencelength - Detailed sentence length analysis
# POST /readability - Readability metrics and difficult paragraphs
# POST /passivevoice - Passive voice, adverbs, hidden verbs, style
# POST /glueindex - Glue index and sticky sentences
#
# Run with: cargo run --release --features server --bin api-server-enhanced
# Server binds to: http://0.0.0.0:2000
[[]]
= "api-server-enhanced"
= "src/bin/api-server-enhanced.rs"
= ["server"]
# ==============================================================================
# DEPENDENCIES
# ==============================================================================
[]
# -----------------------------------------------------------------------------
# CLI & Configuration
# -----------------------------------------------------------------------------
# Command Line Argument Parser - powerful, flexible CLI framework
= { = "4.5", = [
"derive", # Derive macros for struct-based CLI
"cargo", # Read from Cargo.toml
"env", # Environment variable support
"unicode", # Unicode support in help text
"wrap_help", # Automatic help text wrapping
], = true }
# Configuration file parsing (YAML, TOML, JSON)
= { = "0.14", = ["yaml", "toml"] }
# Cross-platform path handling for config directories
= "5.0"
# -----------------------------------------------------------------------------
# Serialization & Data Formats
# -----------------------------------------------------------------------------
# Core serialization framework
= { = "1.0", = ["derive", "rc"] }
# JSON support - used for API responses
= "1.0"
# YAML support - used for configuration files
= "0.9"
# TOML support - used for configuration files
= "0.8"
# -----------------------------------------------------------------------------
# Web Server (API) - Optional, enabled with "server" feature
# -----------------------------------------------------------------------------
# Axum - ergonomic and modular web framework built on Tokio
= { = "0.7", = [
"http1", # HTTP/1.1 support
"http2", # HTTP/2 support
"json", # JSON request/response handling
"multipart", # Multipart form support
"ws", # WebSocket support (future use)
"macros", # Routing macros
], = true }
# Tokio - asynchronous runtime for Rust
= { = "1.36", = ["full"], = true }
# Tower - modular middleware stack
= { = "0.4", = [
"util", # Utility extensions
"timeout", # Request timeout handling
"limit", # Rate limiting
"load-shed", # Load shedding under pressure
"steer", # Request routing
"filter", # Request filtering
], = true }
# Tower-HTTP - HTTP-specific middleware for Tower
= { = "0.5", = [
"cors", # CORS handling (enabled permissively for API)
"trace", # Request tracing
"fs", # Static file serving
"compression-full", # Response compression
"limit", # Request body limits
"set-header", # Header manipulation
"request-id", # Request ID generation
"util", # Utility extensions
], = true }
# UUIDs for request tracking and issue IDs
= { = "1.7", = ["v4", "fast-rng", "serde"] }
# -----------------------------------------------------------------------------
# Error Handling
# -----------------------------------------------------------------------------
# Library error types - derive Error trait easily
= "1.0"
# Application error handling - flexible error propagation
= "1.0"
# -----------------------------------------------------------------------------
# Text Processing & NLP
# -----------------------------------------------------------------------------
# Regular expressions - high performance regex engine
= { = "1.10", = ["unicode", "perf", "std"] }
# Static initialization - lazy evaluation of statics
= "1.4"
# Unicode segmentation - graphemes, words, sentences
= "1.11"
# Unicode normalization - NFC, NFD, NFKC, NFKD
= "0.1"
# Enum iteration and string conversion
= { = "0.26", = ["derive"] }
= "0.26"
# Text formatting for CLI output
= { = "0.16", = ["terminal_size"], = true }
# Perfect Hash Functions - optimized static dictionary lookups
= { = "0.11", = ["macros"] }
# Extra iterator adaptors
= "0.12"
# -----------------------------------------------------------------------------
# Performance & Concurrency
# -----------------------------------------------------------------------------
# Rayon - data parallelism library for CPU-bound tasks
= { = "1.9", = true }
# DashMap - concurrent HashMap for multi-threaded access
= "5.5"
# SmallVec - stack-allocated vectors for small sizes
= { = "1.13", = ["serde", "write"] }
# -----------------------------------------------------------------------------
# Logging & Tracing
# -----------------------------------------------------------------------------
# Structured logging facade
= "0.1"
# Logging subscriber and formatting
= { = "0.3", = [
"env-filter", # RUST_LOG environment variable filtering
"fmt", # Formatted output
"ansi", # Colored terminal output
"json", # JSON log format
"time", # Timestamp support
"local-time", # Local timezone timestamps
] }
# File appender for rotating log files
= "0.2"
# Time handling - dates and timestamps
= { = "0.4", = ["serde"] }
# -----------------------------------------------------------------------------
# Document Parsing (Optional)
# -----------------------------------------------------------------------------
# Markdown parser - CommonMark compliant
= { = "0.10", = true }
# HTML parsing and scraping
= { = "0.18", = true }
# ==============================================================================
# DEV DEPENDENCIES
# ==============================================================================
[]
# Statistical benchmarking framework
= { = "0.5", = ["html_reports", "async_tokio"] }
# Property-based testing
= "1.4"
# Parameterized test cases
= "3.3"
# Pretty assertions for clearer test failures
= "1.4"
# Temporary file creation for tests
= "3.10"
# Async testing utilities
= "0.4"
# HTTP client for API testing
= { = "0.11", = ["json", "blocking"] }
# Mocking library for unit tests
= "0.12"
# ==============================================================================
# BENCHMARKS
# ==============================================================================
[[]]
= "performance"
= false
# ==============================================================================
# FEATURES
# ==============================================================================
[]
# Default features for standard usage (CLI + parallel processing)
= ["cli", "parallel", "markdown", "html"]
# -----------------------------------------------------------------------------
# Core Feature Sets
# -----------------------------------------------------------------------------
# Command Line Interface
# Includes: clap (argument parsing), textwrap (text formatting)
= ["dep:clap", "dep:textwrap"]
# REST API Server (binds to 0.0.0.0:2000)
# Includes: axum, tokio, tower, tower-http
# Endpoints: /analyze, /score, /sentencelength, /readability, /passivevoice, /glueindex
= ["dep:axum", "dep:tokio", "dep:tower", "dep:tower-http"]
# Parallel processing for large documents
# Includes: rayon
= ["dep:rayon"]
# -----------------------------------------------------------------------------
# Document Parsing Support
# -----------------------------------------------------------------------------
# Markdown analysis support
= ["dep:pulldown-cmark"]
# HTML scraping and analysis support
= ["dep:scraper"]
# -----------------------------------------------------------------------------
# Meta Features
# -----------------------------------------------------------------------------
# Full feature set - all capabilities enabled
# Use for development or when all features are needed
= ["cli", "server", "parallel", "markdown", "html"]
# ==============================================================================
# PROFILES
# ==============================================================================
# Optimized Release Profile
# Use for production deployments
[]
= 3 # Maximum optimization
= "fat" # Link Time Optimization (slower build, faster binary)
= 1 # Single codegen unit for better optimization
= "abort" # Abort on panic (smaller binary, no unwinding)
= true # Strip symbols (smaller binary)
# Fast Development Profile
# Use for local development
[]
= 0 # No optimization (fast compile)
= true # Full debug info
= "unpacked" # Faster incremental linking
# Benchmark Profile
# Use for performance testing
[]
= "release"
= true # Keep debug info for profiling
# ==============================================================================
# PACKAGE METADATA
# ==============================================================================
[]
# Build docs with all features enabled
= true
# Document all features
= ["--cfg", "docsrs"]
# Badge configuration for README
[]
= { = "actively-developed" }