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

Function find_repo_root

scripts/coverage.rs:203–214  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

201}
202
203fn find_repo_root() -> PathBuf {
204 let mut dir = env::current_dir().expect("failed to get cwd");
205 loop {
206 if dir.join("Cargo.toml").exists() && dir.join("crates").exists() {
207 return dir;
208 }
209 if !dir.pop() {
210 eprintln!("error: could not find wasmtime repo root");
211 std::process::exit(1);
212 }
213 }
214}
215
216fn find_llvm_tool(name: &str) -> PathBuf {
217 let output = Command::new("rustc")

Callers 1

mainFunction · 0.85

Calls 4

existsMethod · 0.80
expectMethod · 0.45
joinMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected