mod.rs — tailwindcss Source File
Architecture documentation for mod.rs, a rust file in the tailwindcss codebase. 22 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR d865d4fd_bb15_6d9a_a900_10e82a6856fb["mod.rs"] 54ff386e_0f33_4752_db78_7f4b59d67942["super::"] d865d4fd_bb15_6d9a_a900_10e82a6856fb --> 54ff386e_0f33_4752_db78_7f4b59d67942 a1d398d5_15cf_6c95_338f_6f243e682240["crate::extractor::"] d865d4fd_bb15_6d9a_a900_10e82a6856fb --> a1d398d5_15cf_6c95_338f_6f243e682240 6365c445_3f4f_4831_16fe_600bfee8d330["crate::glob::optimize_patterns"] d865d4fd_bb15_6d9a_a900_10e82a6856fb --> 6365c445_3f4f_4831_16fe_600bfee8d330 eada1bb6_a955_30df_c0f6_1062e6ce9449["crate::scanner::detect_sources::resolve_globs"] d865d4fd_bb15_6d9a_a900_10e82a6856fb --> eada1bb6_a955_30df_c0f6_1062e6ce9449 1c55f012_ae4f_3dae_857c_51a0ccc21418["crate::scanner::sources::"] d865d4fd_bb15_6d9a_a900_10e82a6856fb --> 1c55f012_ae4f_3dae_857c_51a0ccc21418 c745f568_cba4_79a2_f483_6b15a85dac8f["crate::GlobEntry"] d865d4fd_bb15_6d9a_a900_10e82a6856fb --> c745f568_cba4_79a2_f483_6b15a85dac8f e7802154_0e17_6fbc_a100_62544b61acf7["auto_source_detection::BINARY_EXTENSIONS_GLOB"] d865d4fd_bb15_6d9a_a900_10e82a6856fb --> e7802154_0e17_6fbc_a100_62544b61acf7 e8f7ef42_4edb_c180_b1a1_7f3dcfa8e322["bstr::ByteSlice"] d865d4fd_bb15_6d9a_a900_10e82a6856fb --> e8f7ef42_4edb_c180_b1a1_7f3dcfa8e322 c87da3ab_c7d6_6bbf_9647_428c395e39e8["fast_glob::glob_match"] d865d4fd_bb15_6d9a_a900_10e82a6856fb --> c87da3ab_c7d6_6bbf_9647_428c395e39e8 4d8e7a76_c287_2c3b_016b_c36be3fc5770["fxhash::"] d865d4fd_bb15_6d9a_a900_10e82a6856fb --> 4d8e7a76_c287_2c3b_016b_c36be3fc5770 d5fe2d46_e7d8_4074_974c_ed9732529800["ignore::"] d865d4fd_bb15_6d9a_a900_10e82a6856fb --> d5fe2d46_e7d8_4074_974c_ed9732529800 ec2ee597_189e_afa4_4f3e_7d29ee8dc6a1["rayon::prelude::*"] d865d4fd_bb15_6d9a_a900_10e82a6856fb --> ec2ee597_189e_afa4_4f3e_7d29ee8dc6a1 93966407_1d8e_f1bf_ccc8_4f7bb51a32c2["std::collections::"] d865d4fd_bb15_6d9a_a900_10e82a6856fb --> 93966407_1d8e_f1bf_ccc8_4f7bb51a32c2 367a6b04_d79d_d7a5_f16c_21620dcb87e8["std::fs::OpenOptions"] d865d4fd_bb15_6d9a_a900_10e82a6856fb --> 367a6b04_d79d_d7a5_f16c_21620dcb87e8 style d865d4fd_bb15_6d9a_a900_10e82a6856fb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
pub mod auto_source_detection;
pub mod detect_sources;
pub mod sources;
use crate::extractor::{Extracted, Extractor};
use crate::glob::optimize_patterns;
use crate::scanner::detect_sources::resolve_globs;
use crate::scanner::sources::{
public_source_entries_to_private_source_entries, PublicSourceEntry, SourceEntry, Sources,
};
use crate::GlobEntry;
use auto_source_detection::BINARY_EXTENSIONS_GLOB;
use bstr::ByteSlice;
use fast_glob::glob_match;
use fxhash::{FxHashMap, FxHashSet};
use ignore::{gitignore::GitignoreBuilder, WalkBuilder};
use rayon::prelude::*;
use std::collections::{BTreeMap, BTreeSet};
use std::fs::OpenOptions;
use std::io::{self, Write};
use std::path::{Path, PathBuf};
use std::sync::{self, Arc, Mutex};
use std::time::SystemTime;
use tracing::event;
use tracing_subscriber::fmt::writer::BoxMakeWriter;
// @source "some/folder"; // This is auto source detection
// @source "some/folder/**/*"; // This is auto source detection
// @source "some/folder/*.html"; // This is just a glob, but new files matching this should be included
// @source "node_modules/my-ui-lib"; // Auto source detection but since node_modules is explicit we allow it
// // Maybe could be considered `external(…)` automatically if:
// // 1. It's git ignored but listed explicitly
// // 2. It exists outside of the current working directory (do we know that?)
//
// @source "do-include-me.bin"; // `.bin` is typically ignored, but now it's explicit so should be included
// @source "git-ignored.html"; // A git ignored file that is listed explicitly, should be scanned
static SHOULD_TRACE: sync::LazyLock<bool> = sync::LazyLock::new(
|| matches!(std::env::var("DEBUG"), Ok(value) if value.eq("*") || (value.contains("tailwindcss:oxide") && !value.contains("-tailwindcss:oxide"))),
);
fn dim(input: &str) -> String {
format!("\u{001b}[2m{input}\u{001b}[22m")
}
fn blue(input: &str) -> String {
format!("\u{001b}[34m{input}\u{001b}[39m")
}
fn highlight(input: &str) -> String {
format!("{}{}{}", dim(&blue("`")), blue(input), dim(&blue("`")))
}
fn init_tracing() {
if !*SHOULD_TRACE {
return;
}
let file_path = format!("tailwindcss-{}.log", std::process::id());
let file = OpenOptions::new()
.create(true)
// ... (779 more lines)
Domain
Subdomains
Functions
- blue()
- create_walker()
- dim()
- extract()
- extract_candidates()
- extract_css_variables()
- flush()
- get_candidates_with_positions()
- get_files()
- get_globs()
- get_normalized_sources()
- highlight()
- init_tracing()
- matches()
- new()
- parse_all_blobs()
- pre_process_input()
- read_all_files()
- read_changed_content()
- scan()
- scan_content()
- scan_sources()
- test_positions()
- write()
Dependencies
- auto_source_detection::BINARY_EXTENSIONS_GLOB
- bstr::ByteSlice
- crate::GlobEntry
- crate::extractor::
- crate::extractor::pre_processors::*
- crate::glob::optimize_patterns
- crate::scanner::detect_sources::resolve_globs
- crate::scanner::sources::
- fast_glob::glob_match
- fxhash::
- ignore::
- pretty_assertions::assert_eq
- rayon::prelude::*
- std::collections::
- std::fs::OpenOptions
- std::io::
- std::path::
- std::sync::
- std::time::SystemTime
- super::
- tracing::event
- tracing_subscriber::fmt::writer::BoxMakeWriter
Source
Frequently Asked Questions
What does mod.rs do?
mod.rs is a source file in the tailwindcss codebase, written in rust. It belongs to the OxideEngine domain, Scanner subdomain.
What functions are defined in mod.rs?
mod.rs defines 24 function(s): blue, create_walker, dim, extract, extract_candidates, extract_css_variables, flush, get_candidates_with_positions, get_files, get_globs, and 14 more.
What does mod.rs depend on?
mod.rs imports 22 module(s): auto_source_detection::BINARY_EXTENSIONS_GLOB, bstr::ByteSlice, crate::GlobEntry, crate::extractor::, crate::extractor::pre_processors::*, crate::glob::optimize_patterns, crate::scanner::detect_sources::resolve_globs, crate::scanner::sources::, and 14 more.
Where is mod.rs in the architecture?
mod.rs is located at crates/oxide/src/scanner/mod.rs (domain: OxideEngine, subdomain: Scanner, directory: crates/oxide/src/scanner).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free