Crate proto_pdk

source ·

Macros§

  • Construct an ad-hoc error from a string or existing non-anyhow error value.
  • Wrap an enum with common derives and serde required attributes.
  • Wrap a struct with common derives and serde required attributes.
  • Calls the exec_command host function to execute a command on the host as a synchronous child process.
  • Calls the get_env_var or set_env_var host function to manage environment variables on the host.
  • Calls the host_log host function to log a message to the host’s terminal.
  • Generate all permutations for the provided OS and architecture mapping.
  • Return an error message wrapped in [WithReturnCode], for use within #[plugin_fn].
  • Calls from_virtual_path on the host to convert the provided value to a real path from a virtual path.
  • Calls to_virtual_path on the host to convert the provided value to a virtual path from a real path.

Structs§

Enums§

Functions§

  • Validate the current host OS and architecture against the supported list of target permutations.
  • Cleans a potential version string by removing a leading v or V, removing each occurence of .*, and removing invalid spaces.
  • Check whether a command exists or not on the host machine.
  • Fetch the provided request and return a response object.
  • Fetch the provided URL and deserialize the response as JSON.
  • Fetch the provided URL and deserialize the response as bytes.
  • Fetch the provided URL and return the text response.
  • Fetch the provided URL, deserialize the response as JSON, and cache the response in memory for subsequent WASM function calls.
  • Return information about the host environment.
  • Return the ID for the current plugin.
  • Return a Rust target triple for the current host OS and architecture.
  • Return information about the testing environment.
  • Get proto tool configuration that was configured in a .prototools file.
  • Returns true if the provided value is an alias. An alias is a word that maps to version, for example, “latest” -> “1.2.3”.
  • is_muslDeprecated
    Detect whether the current OS is utilizing musl instead of gnu.
  • Load all git tags from the provided remote URL. The git binary must exist on the current machine.

Type Aliases§

  • Represents any result (using anyhow).