Module wdk_build::cargo_make

source ·
Expand description

This module provides functions used in the rust scripts in rust-driver-makefile.toml. This includes argument parsing functionality used by rust-driver-makefile.toml to validate and forward arguments common to cargo commands. It uses a combination of clap and clap_cargo to provide a CLI very close to cargo’s own, but only exposes the arguments supported by rust-driver-makefile.toml.

Functions§

  • Copies the file or directory at path_to_copy to the Driver Package folder
  • Returns the name of the current cargo package cargo-make is processing
  • Returns the path to the WDK build output directory for the current cargo-make flow
  • Symlinks rust-driver-toolchain.toml to the target folder where it can be extended from a Makefile.toml. This is necessary so that paths in the rust-driver-toolchain.toml can to be relative to CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY
  • Prepends the path variable with the necessary paths to access WDK tools
  • Parses the command line arguments, validates that they are supported by rust-driver-makefile.toml, and forwards them to cargo-make by printing them to stdout.