Crate warpgate_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.
  • 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 the send_request host function to send an HTTP request and return a response. Not OK responses must be handled by the guest.
  • Calls to_virtual_path on the host to convert the provided value to a virtual path from a real path.

Structs§

Enums§

  • Architecture of the system environment.
  • Libc being used in the system environment.
  • Target where host logs should be written to.
  • Operating system of the current environment.
  • Strategies and protocols for locating plugins.
  • Errors during plugin locator parsing.
  • A container for WASI virtual paths that can also keep a reference to the original real path.

Functions§

  • Check whether a command exists or not on the host machine.
  • fetchDeprecated
    Fetch the provided request and return a response object.
  • Fetch the provided URL and return the response as bytes.
  • Fetch the provided URL and deserialize the response as JSON.
  • Fetch the provided URL and return the response as text.
  • fetch_urlDeprecated
    Fetch the provided URL and deserialize the response as JSON.
  • fetch_url_bytesDeprecated
    Fetch the provided URL and deserialize the response as bytes.
  • fetch_url_textDeprecated
    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 information about the testing environment.
  • 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).