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

Method prepare

crates/test/src/moonbit.rs:36–45  ·  view source on GitHub ↗
(&self, runner: &mut Runner)

Source from the content-addressed store, hash-verified

34 }
35
36 fn prepare(&self, runner: &mut Runner) -> anyhow::Result<()> {
37 println!("Testing if MoonBit toolchain exists...");
38 if runner
39 .run_command(Command::new("moon").arg("version"))
40 .is_err()
41 {
42 bail!("MoonBit toolchain not found. Check out <https://www.moonbitlang.com/download>");
43 }
44 Ok(())
45 }
46
47 fn compile(&self, runner: &Runner, compile: &crate::Compile) -> anyhow::Result<()> {
48 let config = compile.component.deserialize_lang_config::<LangConfig>()?;

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
run_commandMethod · 0.80

Tested by

no test coverage detected