Checks that every Tailwind class literal used in Leptos view! markup is actually present in a built Tailwind CSS file. Catches a real class of bug: tailwind.css in examples/staff-host/spa is a manually-regenerated, checked-in artifact -- trunk build copies+hashes it but never recompiles it, so a class added to .rs source (e.g. grid-cols-8, sprint 3.68) can silently never reach the compiled CSS. A DOM/API-level check cannot see this -- the data renders correctly, only the layout is missing. Sprint 3.68 found this live via a screenshot, not any prior check.
| Tier | tools |
| Role | unclassified (baselined) |
| Path | crates/tools/tailwind-class-scan |
| Edition | 2021 |
| Targets | tools-tailwind-class-scan, tools_tailwind_class_scan |
| Public items | 2 across 0 modules |
| Tests | 9 |
What it is for
Pure logic for tools-tailwind-class-scan. I/O (file walking, CLI) lives in main.rs; this module is deliberately dependency-light so it stays cheap to unit-test.
Capabilities
crate root
Pure logic for tools-tailwind-class-scan. I/O (file walking, CLI) lives in
| Item |
|---|
fn extract_class_tokens(source : & str) -> Vec <String> |
fn find_missing(tokens : & String, css : & str) -> Vec <String> |
How to use it
No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.
Module structure
No public modules: the crate root is its whole surface.
Public surface
`crate root`
| Item | What it is |
|---|---|
fn extract_class_tokens(source : & str) -> Vec <String> | Extract every literal Tailwind class token from class="..." / class=format!("...", ...) attributes in a Leptos view! source file |
fn find_missing(tokens : & String, css : & str) -> Vec <String> | Which of tokens are absent from css (a compiled Tailwind CSS file's content). |
No pub use re-exports: every item above is declared in this crate.
Boundary
Depends on no other workspace tier.
Shares tier tools with 84 other crates: tools-advisory-reach, tools-archive-guard, tools-artifact-scaffold, tools-ask-ai-core, tools-ask-ais, tools-ask-gemini, tools-book, tools-book-report, … (84 total).
_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._
Where it sits
| Tier (ontology) | tools |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/tools/tailwind-class-scan |
| Vocabulary in force (lexicon) | current |
Dependencies
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
anyhow | ^1 | — | no | always |
Development. None.
Build. None.
Depended on by. Nothing in this workspace.
Feature flags
No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.
Targets
| Kind | Name | Source |
|---|---|---|
| bin | tools-tailwind-class-scan | `src/main.rs` |
| lib | tools_tailwind_class_scan | `src/lib.rs` |
Error model
No public error type was detected: no public item declares a type named *Error, and no public signature returns one.
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | none detected |
| database access | none detected |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | none detected |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.
Related capabilities
No workspace crate depends on this one.
Verification
| Kind | Count |
|---|---|
| Unit tests | 9 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 0 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
crate root | 2 | 0 | 0 |
What the tests establish, by name:
a_present_variant_and_decimal_class_are_not_reported_missing—src/lib.rsextracts_a_plain_static_class_attribute—src/lib.rsextracts_literal_tokens_from_a_format_class_and_skips_the_placeholder—src/lib.rsfind_missing_dedupes_and_sorts—src/lib.rsfind_missing_reports_tokens_absent_from_the_css_and_none_when_all_present—src/lib.rshandles_multiple_class_attributes_in_one_file—src/lib.rskeeps_bracketed_arbitrary_value_classes—src/lib.rsreproduces_the_sprint_3_68_stale_css_bug—src/lib.rsskips_a_dynamic_class_expression_with_no_quote_on_the_line—src/lib.rs
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 2 | 2 |
Public modules with a //! block | 0 | 0 |
pie showData
title Public items with rustdoc
"Documented" : 2
"No rustdoc detected" : 0
Metrics
| Metric | Value |
|---|---|
| Rust source files | 2 |
| Source lines | 236 |
| Code lines | 168 |
| Public API items | 2 |
| Public modules | 0 |
| Tests | 9 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 1 |
| Workspace reverse dependencies | 0 |
pie showData
title Public API by kind
"function" : 2
pie showData
title Rust source composition
"Code" : 168
"Blank or comment" : 68
Generation
Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.