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
# -----------------------------------------------------------------------------
# HTML Generator - A Rust-based HTML generation and optimization library.
# -----------------------------------------------------------------------------
[]
= "html-generator"
= "0.0.4"
= "2021"
= "1.56.0"
= "MIT OR Apache-2.0"
= """
A robust Rust library designed for transforming Markdown into SEO-optimized, accessible HTML. Featuring front matter extraction, custom header processing, table of contents generation, and performance optimization for web projects of any scale.
"""
= "https://html-generator.co/"
= "https://doc.html-generator.co/html_generator/"
= "https://github.com/sebastienrousseau/html-generator"
= "README.md"
= "build.rs"
# -----------------------------------------------------------------------------
# Crate Configuration
# -----------------------------------------------------------------------------
= [
"web-programming",
"command-line-utilities",
"data-structures",
"parsing",
"development-tools"
]
# Keywords for easier discoverability on Crates.io.
= ["html", "web_development", "seo", "html-generator"]
# Excluding unnecessary files from the package
= [
"/.git/*", # Exclude version control files
"/.github/*", # Exclude GitHub workflows
"/.gitignore", # Ignore Git ignore file
"/.vscode/*" # Ignore VSCode settings
]
# Including necessary files in the package
= [
"/CONTRIBUTING.md",
"/LICENSE-APACHE",
"/LICENSE-MIT",
"/benches/**",
"/build.rs",
"/Cargo.toml",
"/examples/**",
"/README.md",
"/src/**",
]
# -----------------------------------------------------------------------------
# Library Information
# -----------------------------------------------------------------------------
# The library file that contains the main logic for the binary.
[]
= "html_generator"
= "src/lib.rs"
# -----------------------------------------------------------------------------
# Dependencies
# -----------------------------------------------------------------------------
[]
# Dependencies required for building and running the project.
= "0.9.0"
= { = "0.50", = ["syntect"] }
= "1.5.0"
= "0.4.29"
= "0.0.2"
= "0.18"
= "1.21.4"
= "1.12.3"
= "0.22.0"
= "1.0.149"
= "3.27.0"
= "2.0.18"
= { = "1.50.0", = ["full"] }
= { = "1.22.0", = ["v4"] }
# -----------------------------------------------------------------------------
# Build Dependencies
# -----------------------------------------------------------------------------
[]
# Dependencies for build scripts.
= "0.9.5"
# -----------------------------------------------------------------------------
# Development Dependencies
# -----------------------------------------------------------------------------
[]
# Dependencies required for testing and development.
= "0.5.1"
= "3.3.1"
# -----------------------------------------------------------------------------
# Features
# -----------------------------------------------------------------------------
[]
# Features that can be enabled or disabled.
= []
= []
# -----------------------------------------------------------------------------
# Examples - cargo run --example <name>
# -----------------------------------------------------------------------------
[[]]
= "accessibility"
= "examples/accessibility_example.rs"
[[]]
= "aria"
= "examples/aria_elements_example.rs"
[[]]
= "basic"
= "examples/basic_example.rs"
[[]]
= "comprehensive"
= "examples/comprehensive_example.rs"
[[]]
= "custom"
= "examples/custom_config_example.rs"
[[]]
= "error"
= "examples/error_example.rs"
[[]]
= "generator"
= "examples/generator_example.rs"
[[]]
= "lib"
= "examples/lib_example.rs"
[[]]
= "performance"
= "examples/performance_example.rs"
[[]]
= "seo"
= "examples/seo_example.rs"
[[]]
= "style"
= "examples/style_example.rs"
[[]]
= "utils"
= "examples/utils_example.rs"
# -----------------------------------------------------------------------------
# Criterion Benchmark
# -----------------------------------------------------------------------------
[[]] # Benchmarking configuration.
= "html_benchmark" # Name of the benchmark.
= false # Disable the default benchmark harness.
# -----------------------------------------------------------------------------
# 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", # Enable all common Clippy lints
"clippy::pedantic", # Enable pedantic lints for stricter checking
"clippy::cargo", # Enable lints specific to cargo
"clippy::nursery", # Enable experimental lints from Clippy’s nursery
"clippy::complexity", # Warn on code complexity and suggest improvements
"clippy::correctness", # Ensure code correctness, flagging potential issues
"clippy::perf", # Lints that catch performance issues
"clippy::style", # Suggest stylistic improvements
"clippy::suspicious", # Detect suspicious code patterns
"clippy::module_name_repetitions", # Avoid repeating module names in the crate name
]
# Customize Clippy to allow certain less critical lints.
= [
"clippy::module_inception", # Allow modules with the same name as their parents
"clippy::too_many_arguments", # Allow functions with more than 7 arguments if justified
"clippy::missing_docs_in_private_items", # Skip requiring documentation for private items
]
# Enforce specific warnings and errors more strictly.
= [
"clippy::unwrap_used", # Deny the use of unwrap to ensure error handling
"clippy::expect_used", # Deny the use of expect to avoid improper error handling
]
# -----------------------------------------------------------------------------
# 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
= "z" # 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