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
# -----------------------------------------------------------------------------
# HTTP Handle - A fast and lightweight Rust library for handling HTTP requests
# and responses.
# -----------------------------------------------------------------------------
[]
# General project metadata
= "http-handle" # The name of the library
= "0.0.2" # Initial version of the crate
= ["HTTP Handle Contributors"] # Library contributors (auto-generated if not defined)
= "2021" # Rust edition being used (2021 edition is the latest stable)
= "1.56.0" # Minimum supported Rust version
= "MIT OR Apache-2.0" # Dual licensing strategy for MIT and Apache-2.0
= """
A fast and lightweight Rust library for handling HTTP requests and responses.
""" # Short library description
= "https://http-handle.com/" # Project's homepage URL
= "https://http-handle.com/documentation/index.html" # Documentation URL
= "https://github.com/sebastienrousseau/http-handle" # Repository URL
= "README.md" # Path to the README file
= "build.rs" # Path to the build script (optional if used)
# -----------------------------------------------------------------------------
# Dependencies
# -----------------------------------------------------------------------------
[]
# Required dependencies for building and running the project.
= "1.0" # Error handling library for defining custom errors
= "1.0" # Error handling for context propagation
= { = "1.0", = ["derive"] } # Serialization/deserialization with derive features
= "1.0" # JSON support with Serde
= "0.4" # Logging facade for Rust
= { = "0.11", = true } # Optional logging with environment variable support
# -----------------------------------------------------------------------------
# Library Configuration
# -----------------------------------------------------------------------------
[]
# Library-specific configurations.
= "http_handle" # Name of the library
= "src/lib.rs" # Path to the library’s main file
# -----------------------------------------------------------------------------
# Build Dependencies
# -----------------------------------------------------------------------------
[]
# Dependencies for the build script, used for pre-compilation tasks.
= "0.9" # Ensures that a compatible Rust version is used
# -----------------------------------------------------------------------------
# Development Dependencies
# -----------------------------------------------------------------------------
[]
# Dependencies required for testing and development.
= "3.13" # Temporary file creation for tests
= "1.1" # File system assertion library for tests
= "3.1" # Predicate assertions for test conditions
= "0.5" # Benchmarking library to test performance
# -----------------------------------------------------------------------------
# Examples
# -----------------------------------------------------------------------------
[[]]
# Example code demonstrating the library in use.
= "basic_server" # Name of the example
= "examples/basic_server.rs" # Path to the example file
[[]]
# Example code demonstrating error handling.
= "error_example" # Name of the example
= "examples/error_example.rs" # Path to the example file
[[]]
# Example code demonstrating the library as a library.
= "lib_example" # Name of the example
= "examples/lib_example.rs" # Path to the example file
[[]]
# Example code demonstrating request handling.
= "request_example" # Name of the example
= "examples/request_example.rs" # Path to the example file
[[]]
# Example code demonstrating response handling.
= "response_example" # Name of the example
= "examples/response_example.rs" # Path to the example file
[[]]
# Example code demonstrating server handling.
= "server_example" # Name of the example
= "examples/server_example.rs" # Path to the example file
# -----------------------------------------------------------------------------
# Criterion Benchmark
# -----------------------------------------------------------------------------
[[]]
# Benchmarking configuration for performance testing.
= "server_benchmark" # Name of the benchmark
= false # Disable the default benchmark harness (used by Criterion)
[]
# Profile used when running benchmarks.
= true # Include debug symbols for better diagnostics
# -----------------------------------------------------------------------------
# Features
# -----------------------------------------------------------------------------
[]
# Optional features that can be enabled or disabled.
= [] # No default features enabled
= [] # Placeholder for future asynchronous feature support
# -----------------------------------------------------------------------------
# Documentation Configuration
# -----------------------------------------------------------------------------
[]
# Settings for building and hosting documentation on docs.rs.
= true # Build documentation with all features enabled
= ["--cfg", "docsrs"] # Arguments passed to `rustdoc` when building the documentation
= ["x86_64-unknown-linux-gnu"] # Default target platform for the docs
# -----------------------------------------------------------------------------
# Linting Configuration
# -----------------------------------------------------------------------------
[]
# Linting rules for the project.
## Warnings
= "warn" # Warn if types can implement `Copy` but don’t
= "warn" # Warn if public items lack documentation
= "warn" # Warn on the usage of unstable features
= "warn" # Warn about unused external crates
= "warn" # Warn if a result type is unused (e.g., errors ignored)
## Allowances
= "allow" # Allow bare trait objects (e.g., `Box<dyn Trait>`)
= "allow" # Allow lifetimes to be elided in paths
= "allow" # Allow non-camel-case types
= "allow" # Allow non-uppercase global variables
= "allow" # Allow trivial bounds in trait definitions
= "allow" # Allow the usage of unsafe code blocks
## Forbidden
= "forbid" # Forbid missing `Debug` implementations
= "forbid" # Forbid non-ASCII identifiers
= "forbid" # Forbid unreachable `pub` items
## Denials
= "deny" # Deny unused, dead code in the project
= "deny" # Deny code that will be deprecated in the future
= "deny" # Deny usage of inclusive ranges in match patterns (`...`)
= "deny" # Deny unnecessary lifetime outlives requirements
= { = "deny", = -1 } # Handle future compatibility issues
= { = "deny", = -1 } # Deny usage of keywords as identifiers
= "deny" # Deny macro use of `extern crate`
= "deny" # Deny misuse of meta variables in macros
= "deny" # Deny missing fragment specifiers in macros
= "deny" # Deny method calls that have no effect
= { = "deny", = -1 } # Enforce Rust 2018 idioms
= { = "deny", = -1 } # Enforce Rust 2021 compatibility
= "deny" # Deny lifetimes that are used only once
= "deny" # Deny trivial casts (e.g., `as` when unnecessary)
= "deny" # Deny trivial numeric casts (e.g., `i32` to `i64`)
= { = "deny", = -1 } # Deny unused code, variables, etc.
= "deny" # Deny unused features
= "deny" # Deny unnecessary braces around imports
= "deny" # Deny unused labels in loops
= "deny" # Deny unused lifetimes
= "deny" # Deny unused macros
= "deny" # Deny unnecessary type qualifications
= "deny" # Deny enum variants with significant size differences
# -----------------------------------------------------------------------------
# Clippy Configuration
# -----------------------------------------------------------------------------
[]
# Clippy lint configuration for enhanced code analysis.
= [
"clippy::all", # Warn on all common Clippy lints
"clippy::pedantic", # Enable pedantic lints for stricter checking
"clippy::cargo", # Enable lints specific to cargo
"clippy::nursery", # Enable lints from Clippy’s nursery (experimental)
]
# -----------------------------------------------------------------------------
# Profiles
# -----------------------------------------------------------------------------
[]
# Development profile configuration for fast builds and debugging.
= 256 # Increase codegen units for faster compilation
= true # Enable debugging symbols
= true # Enable debug assertions
= true # Enable incremental compilation
= false # Disable link-time optimization for development
= 0 # No optimizations in development
= true # Enable overflow checks for arithmetic operations
= 'unwind' # Enable unwinding for panics (useful in development)
= false # Disable rpath generation
= false # Do not strip symbols in development builds
[]
# Release profile configuration for optimized builds.
= 1 # Reduce codegen units for better performance
= false # Disable debug symbols in release builds
= false # Disable debug assertions
= false # Disable incremental compilation for optimal binary size
= true # Enable link-time optimization for smaller and faster binaries
= "s" # Optimize for binary size
= false # Disable overflow checks for performance
= "abort" # Use abort on panic for minimal overhead
= false # Disable rpath generation
= "symbols" # Strip symbols for smaller binary size
[]
# Test profile configuration for debugging and development.
= 256 # Increase codegen units for faster test builds
= true # Enable debugging symbols for test builds
= true # Enable debug assertions for tests
= true # Enable incremental compilation for tests
= false # Disable link-time optimization during testing
= 0 # No optimizations in test builds
= true # Enable overflow checks for tests
= false # Disable rpath generation
= false # Do not strip symbols in test builds