MCPcopy Create free account
hub / github.com/bytecodealliance/cargo-component / cargo_component

Method cargo_component

tests/support/mod.rs:374–387  ·  view source on GitHub ↗
(&self, args: I)

Source from the content-addressed store, hash-verified

372 }
373
374 pub fn cargo_component<I, S>(&self, args: I) -> Command
375 where
376 I: IntoIterator<Item = S>,
377 S: AsRef<OsStr>,
378 {
379 let mut cmd = cargo_component(args);
380 // Set the cache dir and the config file env var for every command
381 if let Some(config_file) = self.config_file() {
382 cmd.env(CONFIG_FILE_ENV_VAR, config_file);
383 }
384 cmd.env(CACHE_DIR_ENV_VAR, self.cache_dir());
385 cmd.current_dir(&self.root);
386 cmd
387 }
388}
389
390pub fn validate_component(path: &Path) -> Result<()> {

Calls 3

cargo_componentFunction · 0.85
config_fileMethod · 0.80
cache_dirMethod · 0.80