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
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
# -----------------------------------------------------------------------------
# HTML Generator - A Rust-based HTML generation and optimization library.
# -----------------------------------------------------------------------------
[]
= "html-generator"
= "0.0.7"
= "2021"
= "1.80.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"
= false
# -----------------------------------------------------------------------------
# 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",
"/data/**",
"/examples/**",
"/README.md",
"/src/**",
]
# -----------------------------------------------------------------------------
# Library Information
# -----------------------------------------------------------------------------
# The library file that contains the main logic.
#
# `cdylib` is required so `wasm-pack build` produces a usable
# `html_generator_bg.wasm` + `html_generator.js` JS-importable
# bundle. `rlib` is kept so this crate can still be a regular Rust
# dependency. Native builds use `rlib` only — the `cdylib` artifact
# is only emitted when targeting `wasm32-*`.
[]
= "html_generator"
= "src/lib.rs"
= ["cdylib", "rlib"]
# -----------------------------------------------------------------------------
# Dependencies
# -----------------------------------------------------------------------------
[]
# Dependencies required for building and running the project.
= "4"
= "2"
= "0.4"
= "0.18"
# Pure-Rust YAML parser used for front-matter extraction. Replaces the
# previously inlined `src/yaml/` snapshot. `default-features = false`
# with `["std"]` drops the `itoa`/`ryu` formatting accelerators we
# don't need on the parse-only hot path. Pinned to `=0.0.3` while the
# crate is pre-1.0 so a noyalib patch release can't surprise this
# crate's `cargo publish --dry-run` gate.
= { = "=0.0.15", = false, = ["std"] }
= "1.21.4"
= { = "0.7", = true }
= "1.12.4"
= "0.27.0"
= { = "1", = ["derive"] }
= "1.0.150"
= "2.0.18"
= { = "1.50.0", = ["rt-multi-thread", "macros"], = true }
= "1.1"
# WASM bindings (gated behind the `wasm` feature). `js-sys` is
# pulled in only on `wasm32` targets where it is needed for any
# `getrandom`/timing fallbacks downstream crates require.
= { = "0.2", = true }
= { = "0.3", = true }
# Native targets get the full `mdx-gen` pipeline (custom blocks,
# enhanced tables, optional syntax highlighting via `syntect`).
[]
= "0.0.2"
# WASM targets: bypass `mdx-gen` and use `comrak` directly. `mdx-gen`
# pulls in `tokio` (which pulls in `mio`) unconditionally, neither
# of which compile to `wasm32-unknown-unknown`. The trade-off on
# WASM is loss of `mdx-gen`'s `:::class` blocks, image-class syntax,
# and `syntect` syntax highlighting; the core CommonMark/GFM
# pipeline is identical because `mdx-gen` itself wraps `comrak`.
# `getrandom` needs `wasm_js` so transitive uses compile.
[]
= { = "0.50", = false }
= { = "0.3", = ["wasm_js"] }
# -----------------------------------------------------------------------------
# Build Dependencies
# -----------------------------------------------------------------------------
[]
# Dependencies for build scripts.
= "0.9.5"
# -----------------------------------------------------------------------------
# Development Dependencies
# -----------------------------------------------------------------------------
[]
# Dependencies required for testing and development. `tempfile` is
# referenced from `#[cfg(test)]` modules in `src/`, so it has to be
# available for the wasm32 test build too — fortunately it is
# wasm-friendly.
= "3.3.1"
= "3.27.0"
# Native-only dev-deps: `criterion` pulls in `rayon`, which doesn't
# compile to `wasm32-unknown-unknown` (the `wasm-pack test --node`
# CI gate would fail on its `cargo build --tests` step otherwise).
# The competitor-bench engines are likewise native-only.
[]
= "0.8"
# Comparative-bench dependencies — competitor markdown engines
# benchmarked side-by-side in `benches/competitors.rs`. Pinned to
# major versions stable on crates.io as of v0.0.5.
= "0.50"
= "0.13"
# WASM headless test harness — only used when the `wasm` feature
# is enabled and the target is `wasm32`.
[]
= "0.3"
# -----------------------------------------------------------------------------
# Features
# -----------------------------------------------------------------------------
[]
# Features that can be enabled or disabled.
= ["math"]
= ["dep:tokio"]
# Server-side LaTeX → MathML rendering for `$..$` and `$$..$$`
# spans. Pulled in by default because pure-Rust + zero-runtime-JS;
# disable with `--no-default-features` if you want a smaller binary
# and will render math client-side instead.
= ["dep:pulldown-latex"]
# WebAssembly bindings via `wasm-bindgen`. Exposes
# `generate_html_wasm` for use from JavaScript (Workers, browsers,
# Node). Build with `cargo build --target wasm32-unknown-unknown
# --features wasm` or `wasm-pack build`. Time/file-IO paths are
# gated out for `wasm32` targets — only the in-memory rendering
# pipeline is exposed.
= ["dep:wasm-bindgen", "dep:js-sys"]
# -----------------------------------------------------------------------------
# Examples - cargo run --example <name>
# -----------------------------------------------------------------------------
[[]]
= "hello"
= "examples/hello.rs"
[[]]
= "pipeline"
= "examples/pipeline.rs"
[[]]
= "frontmatter"
= "examples/frontmatter.rs"
[[]]
= "accessibility"
= "examples/accessibility.rs"
[[]]
= "seo"
= "examples/seo.rs"
[[]]
= "toc"
= "examples/toc.rs"
[[]]
= "minify"
= "examples/minify.rs"
[[]]
= "errors"
= "examples/errors.rs"
[[]]
= "config"
= "examples/config.rs"
[[]]
= "headers"
= "examples/headers.rs"
[[]]
= "async"
= "examples/async.rs"
= ["async"]
[[]]
= "custom_syntax"
= "examples/custom_syntax.rs"
[[]]
= "emojis"
= "examples/emojis.rs"
[[]]
= "math_and_diagrams"
= "examples/math_and_diagrams.rs"
# -----------------------------------------------------------------------------
# Criterion Benchmark
# -----------------------------------------------------------------------------
[[]] # Benchmarking configuration.
= "html_benchmark" # Name of the benchmark.
= false # Disable the default benchmark harness.
# Competitor comparison: same realistic 8 KB blog payload run through
# html-generator and three popular CommonMark crates so the README's
# performance section can cite measured numbers, not estimates.
[[]]
= "competitors"
= false
# -----------------------------------------------------------------------------
# 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
# wasm-pack post-processing for `wasm-pack build --release ...`. The
# `--enable-bulk-memory` and `--enable-nontrapping-float-to-int`
# flags are required because current rustc emits those wasm
# instructions and the wasm-opt bundled with wasm-pack is older than
# the spec extensions needed to validate them. Without this metadata
# the bulk-memory `memory.copy` instructions that the compiler
# inlines fail wasm-opt validation. `-Os` keeps the size focus
# (typically shrinks the bindgen-processed `.wasm` 3–5×).
[]
= ["-Os", "--enable-bulk-memory", "--enable-nontrapping-float-to-int"]
# -----------------------------------------------------------------------------
# Linting Configuration
# -----------------------------------------------------------------------------
[]
# Linting rules for the project.
## Warnings
= "warn" # Warn if types can implement `Copy` but don’t
= "deny" # Deny missing docs on public items — every item ships with `# Examples`.
= "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
= "forbid" # Forbid 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 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
# -----------------------------------------------------------------------------
# Bench Profile — overrides release defaults for criterion measurements.
# -----------------------------------------------------------------------------
# Criterion inherits `profile.release` by default; `opt-level = "z"` there
# optimises for binary size at the cost of throughput. Bench numbers must
# reflect realistic release performance, so pin the speed-focused knobs
# here.
[]
# `panic` is intentionally omitted: cargo ignores `panic` for the bench
# profile because benchmarks rely on unwinding for reporting.
= 1
= false
= false
= false
= "fat"
= 3
= false
= "symbols"