main() — tailwindcss Function Reference
Architecture documentation for the main() function in walk.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 1742c6b1_ff24_3312_5854_589416697808["main()"] be93aded_79c0_e643_a463_99c7888bc51c["walk.rs"] 1742c6b1_ff24_3312_5854_589416697808 -->|defined in| be93aded_79c0_e643_a463_99c7888bc51c 0cbc5087_81bc_efff_14e1_b213163cc5c4["path()"] 1742c6b1_ff24_3312_5854_589416697808 -->|calls| 0cbc5087_81bc_efff_14e1_b213163cc5c4 style 1742c6b1_ff24_3312_5854_589416697808 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
crates/ignore/examples/walk.rs lines 5–52
fn main() {
let mut path = env::args().nth(1).unwrap();
let mut parallel = false;
let mut simple = false;
let (tx, rx) = crossbeam_channel::bounded::<DirEntry>(100);
if path == "parallel" {
path = env::args().nth(2).unwrap();
parallel = true;
} else if path == "walkdir" {
path = env::args().nth(2).unwrap();
simple = true;
}
let stdout_thread = std::thread::spawn(move || {
let mut stdout = std::io::BufWriter::new(std::io::stdout());
for dent in rx {
stdout
.write_all(&Vec::from_path_lossy(dent.path()))
.unwrap();
stdout.write_all(b"\n").unwrap();
}
});
if parallel {
let walker = WalkBuilder::new(path).threads(6).build_parallel();
walker.run(|| {
let tx = tx.clone();
Box::new(move |result| {
use ignore::WalkState::*;
tx.send(DirEntry::Y(result.unwrap())).unwrap();
Continue
})
});
} else if simple {
let walker = WalkDir::new(path);
for result in walker {
tx.send(DirEntry::X(result.unwrap())).unwrap();
}
} else {
let walker = WalkBuilder::new(path).build();
for result in walker {
tx.send(DirEntry::Y(result.unwrap())).unwrap();
}
}
drop(tx);
stdout_thread.join().unwrap();
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does main() do?
main() is a function in the tailwindcss codebase, defined in crates/ignore/examples/walk.rs.
Where is main() defined?
main() is defined in crates/ignore/examples/walk.rs at line 5.
What does main() call?
main() calls 1 function(s): path.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free