MCPcopy Create free account
hub / github.com/bytecodealliance/wit-bindgen / verify

Method verify

crates/test/src/cpp.rs:181–210  ·  view source on GitHub ↗
(&self, runner: &Runner, verify: &crate::Verify)

Source from the content-addressed store, hash-verified

179 }
180
181 fn verify(&self, runner: &Runner, verify: &crate::Verify) -> anyhow::Result<()> {
182 // for expected
183 let cwd = std::env::current_dir()?;
184 let mut helper_dir2 = cwd;
185 helper_dir2.push("crates");
186 helper_dir2.push("cpp");
187 helper_dir2.push("test_headers");
188
189 let compiler = clangpp(runner);
190 let mut cmd = Command::new(compiler);
191 cmd.arg(
192 verify
193 .bindings_dir
194 .join(format!("{}.cpp", verify.world.to_snake_case())),
195 )
196 .arg("-I")
197 .arg(&verify.bindings_dir)
198 .arg("-I")
199 .arg(helper_dir2.to_str().unwrap())
200 .arg("-Wall")
201 .arg("-Wextra")
202 .arg("-Werror")
203 .arg("-Wc++-compat")
204 .arg("-Wno-unused-parameter")
205 .arg("-std=c++20")
206 .arg("-c")
207 .arg("-o")
208 .arg(verify.artifacts_dir.join("tmp.o"));
209 runner.run_command(&mut cmd)
210 }
211}

Callers

nothing calls this directly

Calls 5

clangppFunction · 0.85
newFunction · 0.85
joinMethod · 0.80
run_commandMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected