4
4
5
5
[package ]
6
6
name = " html-generator"
7
- version = " 0.0.1 "
7
+ version = " 0.0.2 "
8
8
edition = " 2021"
9
9
rust-version = " 1.56.0"
10
10
license = " MIT OR Apache-2.0"
@@ -28,8 +28,35 @@ categories = [
28
28
" development-tools"
29
29
]
30
30
31
+ # Keywords for easier discoverability on Crates.io.
31
32
keywords = [" html" , " web_development" , " seo" , " html-generator" ]
32
33
34
+ # Excluding unnecessary files from the package
35
+ exclude = [
36
+ " /.git/*" , # Exclude version control files
37
+ " /.github/*" , # Exclude GitHub workflows
38
+ " /.gitignore" , # Ignore Git ignore file
39
+ " /.vscode/*" # Ignore VSCode settings
40
+ ]
41
+
42
+ # Including necessary files in the package
43
+ include = [
44
+ " /CONTRIBUTING.md" ,
45
+ " /LICENSE-APACHE" ,
46
+ " /LICENSE-MIT" ,
47
+ " /benches/**" ,
48
+ " /build.rs" ,
49
+ " /Cargo.toml" ,
50
+ " /examples/**" ,
51
+ " /README.md" ,
52
+ " /src/**" ,
53
+ ]
54
+
55
+ # -----------------------------------------------------------------------------
56
+ # Library Information
57
+ # -----------------------------------------------------------------------------
58
+
59
+ # The library file that contains the main logic for the binary.
33
60
[lib ]
34
61
name = " html_generator"
35
62
path = " src/lib.rs"
@@ -40,43 +67,36 @@ path = "src/lib.rs"
40
67
41
68
[dependencies ]
42
69
# Dependencies required for building and running the project.
43
- comrak = " 0.29"
44
- frontmatter-gen = " 0.0.5"
45
- lazy_static = " 1.5"
70
+ cfg = " 0.9.0"
71
+ comrak = " 0.31.0"
72
+ lazy_static = " 1.5.0"
73
+ log = " 0.4.22"
46
74
mdx-gen = " 0.0.1"
47
- minify-html = " 0.15"
48
- once_cell = " 1.20"
49
- regex = " 1.11"
50
- scraper = " 0.21"
51
- serde = { version = " 1.0" , features = [" derive" ] }
52
- serde_json = " 1.0"
53
- tempfile = " 3.13"
54
- thiserror = " 2.0"
55
- tokio = { version = " 1.40" , features = [" full" ] }
75
+ minify-html = " 0.15.0"
76
+ once_cell = " 1.20.2"
77
+ regex = " 1.11.1"
78
+ scraper = " 0.21.0"
79
+ serde_json = " 1.0.133"
80
+ tempfile = " 3.14.0"
81
+ thiserror = " 2.0.3"
82
+ tokio = { version = " 1.41.1" , features = [" full" ] }
56
83
57
84
# -----------------------------------------------------------------------------
58
85
# Build Dependencies
59
86
# -----------------------------------------------------------------------------
60
87
61
88
[build-dependencies ]
62
89
# Dependencies for build scripts.
63
- version_check = " 0.9.4 "
90
+ version_check = " 0.9.5 "
64
91
65
92
# -----------------------------------------------------------------------------
66
93
# Development Dependencies
67
94
# -----------------------------------------------------------------------------
68
95
69
96
[dev-dependencies ]
70
97
# Dependencies required for testing and development.
71
- criterion = " 0.5"
72
-
73
- # -----------------------------------------------------------------------------
74
- # Examples
75
- # -----------------------------------------------------------------------------
76
-
77
- # [[example]]
78
- # name = "error_example"
79
- # path = "examples/error_example.rs"
98
+ criterion = " 0.5.1"
99
+ test-case = " 3.3.1"
80
100
81
101
82
102
# -----------------------------------------------------------------------------
@@ -89,9 +109,184 @@ default = []
89
109
async = []
90
110
91
111
# -----------------------------------------------------------------------------
92
- # Documentation Configuration
112
+ # Examples - cargo run --example <name>
113
+ # -----------------------------------------------------------------------------
114
+
115
+ [[example ]]
116
+ name = " accessibility"
117
+ path = " examples/accessibility_example.rs"
118
+
119
+ [[example ]]
120
+ name = " basic"
121
+ path = " examples/basic_example.rs"
122
+
123
+ [[example ]]
124
+ name = " comprehensive"
125
+ path = " examples/comprehensive_example.rs"
126
+
127
+ [[example ]]
128
+ name = " custom"
129
+ path = " examples/custom_config_example.rs"
130
+
131
+ [[example ]]
132
+ name = " error"
133
+ path = " examples/error_example.rs"
134
+
135
+ [[example ]]
136
+ name = " generator"
137
+ path = " examples/generator_example.rs"
138
+
139
+ [[example ]]
140
+ name = " lib"
141
+ path = " examples/lib_example.rs"
142
+
143
+ [[example ]]
144
+ name = " performance"
145
+ path = " examples/performance_example.rs"
146
+
147
+ [[example ]]
148
+ name = " seo"
149
+ path = " examples/seo_example.rs"
150
+
151
+ [[example ]]
152
+ name = " utils"
153
+ path = " examples/utils_example.rs"
154
+
93
155
# -----------------------------------------------------------------------------
156
+ # Criterion Benchmark
157
+ # -----------------------------------------------------------------------------
158
+ [[bench ]] # Benchmarking configuration.
159
+ name = " html_benchmark" # Name of the benchmark.
160
+ harness = false # Disable the default benchmark harness.
94
161
162
+ # -----------------------------------------------------------------------------
163
+ # Documentation Configuration
164
+ # -----------------------------------------------------------------------------
95
165
[package .metadata .docs .rs ]
96
- all-features = true
97
- rustdoc-args = [" --cfg" , " docsrs" ]
166
+ # Settings for building and hosting documentation on docs.rs.
167
+ all-features = true # Build documentation with all features enabled
168
+ rustdoc-args = [" --cfg" , " docsrs" ] # Arguments passed to `rustdoc` when building the documentation
169
+ targets = [" x86_64-unknown-linux-gnu" ] # Default target platform for the docs
170
+
171
+ # -----------------------------------------------------------------------------
172
+ # Linting Configuration
173
+ # -----------------------------------------------------------------------------
174
+ [lints .rust ]
175
+ # Linting rules for the project.
176
+
177
+ # # Warnings
178
+ missing_copy_implementations = " warn" # Warn if types can implement `Copy` but don’t
179
+ missing_docs = " warn" # Warn if public items lack documentation
180
+ unstable_features = " warn" # Warn on the usage of unstable features
181
+ unused_extern_crates = " warn" # Warn about unused external crates
182
+ unused_results = " warn" # Warn if a result type is unused (e.g., errors ignored)
183
+
184
+ # # Allowances
185
+ bare_trait_objects = " allow" # Allow bare trait objects (e.g., `Box<dyn Trait>`)
186
+ elided_lifetimes_in_paths = " allow" # Allow lifetimes to be elided in paths
187
+ non_camel_case_types = " allow" # Allow non-camel-case types
188
+ non_upper_case_globals = " allow" # Allow non-uppercase global variables
189
+ trivial_bounds = " allow" # Allow trivial bounds in trait definitions
190
+ unsafe_code = " allow" # Allow the usage of unsafe code blocks
191
+
192
+ # # Forbidden
193
+ missing_debug_implementations = " forbid" # Forbid missing `Debug` implementations
194
+ non_ascii_idents = " forbid" # Forbid non-ASCII identifiers
195
+ unreachable_pub = " forbid" # Forbid unreachable `pub` items
196
+
197
+ # # Denials
198
+ dead_code = " deny" # Deny unused, dead code in the project
199
+ deprecated_in_future = " deny" # Deny code that will be deprecated in the future
200
+ ellipsis_inclusive_range_patterns = " deny" # Deny usage of inclusive ranges in match patterns (`...`)
201
+ explicit_outlives_requirements = " deny" # Deny unnecessary lifetime outlives requirements
202
+ future_incompatible = { level = " deny" , priority = -1 } # Handle future compatibility issues
203
+ keyword_idents = { level = " deny" , priority = -1 } # Deny usage of keywords as identifiers
204
+ macro_use_extern_crate = " deny" # Deny macro use of `extern crate`
205
+ meta_variable_misuse = " deny" # Deny misuse of meta variables in macros
206
+ missing_fragment_specifier = " deny" # Deny missing fragment specifiers in macros
207
+ noop_method_call = " deny" # Deny method calls that have no effect
208
+ rust_2018_idioms = { level = " deny" , priority = -1 } # Enforce Rust 2018 idioms
209
+ rust_2021_compatibility = { level = " deny" , priority = -1 } # Enforce Rust 2021 compatibility
210
+ single_use_lifetimes = " deny" # Deny lifetimes that are used only once
211
+ trivial_casts = " deny" # Deny trivial casts (e.g., `as` when unnecessary)
212
+ trivial_numeric_casts = " deny" # Deny trivial numeric casts (e.g., `i32` to `i64`)
213
+ unused = { level = " deny" , priority = -1 } # Deny unused code, variables, etc.
214
+ unused_features = " deny" # Deny unused features
215
+ unused_import_braces = " deny" # Deny unnecessary braces around imports
216
+ unused_labels = " deny" # Deny unused labels in loops
217
+ unused_lifetimes = " deny" # Deny unused lifetimes
218
+ unused_macro_rules = " deny" # Deny unused macros
219
+ unused_qualifications = " deny" # Deny unnecessary type qualifications
220
+ variant_size_differences = " deny" # Deny enum variants with significant size differences
221
+
222
+ # -----------------------------------------------------------------------------
223
+ # Clippy Configuration
224
+ # -----------------------------------------------------------------------------
225
+ [package .metadata .clippy ]
226
+ # Clippy lint configuration for enhanced code analysis.
227
+ warn-lints = [
228
+ " clippy::all" , # Enable all common Clippy lints
229
+ " clippy::pedantic" , # Enable pedantic lints for stricter checking
230
+ " clippy::cargo" , # Enable lints specific to cargo
231
+ " clippy::nursery" , # Enable experimental lints from Clippy’s nursery
232
+ " clippy::complexity" , # Warn on code complexity and suggest improvements
233
+ " clippy::correctness" , # Ensure code correctness, flagging potential issues
234
+ " clippy::perf" , # Lints that catch performance issues
235
+ " clippy::style" , # Suggest stylistic improvements
236
+ " clippy::suspicious" , # Detect suspicious code patterns
237
+ " clippy::module_name_repetitions" , # Avoid repeating module names in the crate name
238
+ ]
239
+
240
+ # Customize Clippy to allow certain less critical lints.
241
+ allow-lints = [
242
+ " clippy::module_inception" , # Allow modules with the same name as their parents
243
+ " clippy::too_many_arguments" , # Allow functions with more than 7 arguments if justified
244
+ " clippy::missing_docs_in_private_items" , # Skip requiring documentation for private items
245
+ ]
246
+
247
+ # Enforce specific warnings and errors more strictly.
248
+ deny-lints = [
249
+ " clippy::unwrap_used" , # Deny the use of unwrap to ensure error handling
250
+ " clippy::expect_used" , # Deny the use of expect to avoid improper error handling
251
+ ]
252
+
253
+ # -----------------------------------------------------------------------------
254
+ # Profiles
255
+ # -----------------------------------------------------------------------------
256
+ [profile .dev ]
257
+ # Development profile configuration for fast builds and debugging.
258
+ codegen-units = 256 # Increase codegen units for faster compilation
259
+ debug = true # Enable debugging symbols
260
+ debug-assertions = true # Enable debug assertions
261
+ incremental = true # Enable incremental compilation
262
+ lto = false # Disable link-time optimization for development
263
+ opt-level = 0 # No optimizations in development
264
+ overflow-checks = true # Enable overflow checks for arithmetic operations
265
+ panic = ' unwind' # Enable unwinding for panics (useful in development)
266
+ rpath = false # Disable rpath generation
267
+ strip = false # Do not strip symbols in development builds
268
+
269
+ [profile .release ]
270
+ # Release profile configuration for optimized builds.
271
+ codegen-units = 1 # Reduce codegen units for better performance
272
+ debug = false # Disable debug symbols in release builds
273
+ debug-assertions = false # Disable debug assertions
274
+ incremental = false # Disable incremental compilation for optimal binary size
275
+ lto = true # Enable link-time optimization for smaller and faster binaries
276
+ opt-level = " z" # Optimize for binary size
277
+ overflow-checks = false # Disable overflow checks for performance
278
+ panic = " abort" # Use abort on panic for minimal overhead
279
+ rpath = false # Disable rpath generation
280
+ strip = " symbols" # Strip symbols for smaller binary size
281
+
282
+ [profile .test ]
283
+ # Test profile configuration for debugging and development.
284
+ codegen-units = 256 # Increase codegen units for faster test builds
285
+ debug = true # Enable debugging symbols for test builds
286
+ debug-assertions = true # Enable debug assertions for tests
287
+ incremental = true # Enable incremental compilation for tests
288
+ lto = false # Disable link-time optimization during testing
289
+ opt-level = 0 # No optimizations in test builds
290
+ overflow-checks = true # Enable overflow checks for tests
291
+ rpath = false # Disable rpath generation
292
+ strip = false # Do not strip symbols in test builds
0 commit comments