Crate proto_pdk

source ·

Macros

  • Return a [PluginError] wrapped in [WithReturnCode].
  • 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.

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 return the text response.
  • Fetch the provided URL, deserialize the response as JSON, and cache the response in memory for subsequent WASM function calls.
  • format_bin_nameDeprecated
    Return the name of the binary for the provided name and OS. On Windows, will append “.exe”, and keep as-is on other OS’s.
  • Return information about proto and the host environment.
  • Return the loaded proto user configuration (~/.proto/.prototools). Does not include plugins!
  • Return a Rust target triple for the current host OS and architecture.
  • Get tool configuration for the current WASM plugin that was configured in a .prototools file.
  • Get the tool ID for the current WASM plugin.
  • Returns true if the provided value is an alias. An alias is a word that maps to version, for example, “latest” -> “1.2.3”.
  • 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.