MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / find_crates

Function find_crates

scripts/publish.rs:244–256  ·  view source on GitHub ↗
(dir: &Path, ws: &Workspace, dst: &mut Vec<Crate>)

Source from the content-addressed store, hash-verified

242}
243
244fn find_crates(dir: &Path, ws: &Workspace, dst: &mut Vec<Crate>) {
245 if dir.join("Cargo.toml").exists() {
246 let krate = read_crate(Some(ws), &dir.join("Cargo.toml"));
247 dst.push(krate);
248 }
249
250 for entry in dir.read_dir().unwrap() {
251 let entry = entry.unwrap();
252 if entry.file_type().unwrap().is_dir() {
253 find_crates(&entry.path(), ws, dst);
254 }
255 }
256}
257
258fn read_crate(ws: Option<&Workspace>, manifest: &Path) -> Crate {
259 let mut name = None;

Callers 1

mainFunction · 0.85

Calls 7

read_crateFunction · 0.85
existsMethod · 0.80
is_dirMethod · 0.80
joinMethod · 0.45
pushMethod · 0.45
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected