(&self, runner: &mut Runner)
| 56 | } |
| 57 | |
| 58 | fn prepare(&self, runner: &mut Runner) -> anyhow::Result<()> { |
| 59 | let compiler = clangpp(runner); |
| 60 | let cwd = std::env::current_dir()?; |
| 61 | let dir = cwd.join(&runner.opts.artifacts).join("cpp"); |
| 62 | |
| 63 | super::write_if_different(&dir.join("test.cpp"), "int main() { return 0; }")?; |
| 64 | |
| 65 | println!("Testing if `{}` works...", compiler.display()); |
| 66 | runner |
| 67 | .run_command(Command::new(&compiler).current_dir(&dir).arg("test.cpp")) |
| 68 | .inspect_err(|_| { |
| 69 | eprintln!( |
| 70 | "Error: failed to find `{}`. Hint: pass `--wasi-sdk-path` or set `WASI_SDK_PATH`", |
| 71 | compiler.display() |
| 72 | ); |
| 73 | })?; |
| 74 | |
| 75 | Ok(()) |
| 76 | } |
| 77 | |
| 78 | fn generate_bindings_prepare( |
| 79 | &self, |
nothing calls this directly
no test coverage detected