Crate warpgate_pdk

Crate warpgate_pdk 

Source

Macros§

anyhow
Construct an ad-hoc error from a string or existing non-anyhow error value.
api_enum
Wrap an enum with common derives and serde required attributes.
api_struct
Wrap a struct with common derives and serde required attributes.
api_unit_enum
Wrap a unit-only enum with common derives and serde required attributes.
exec_command
Calls the exec_command host function to execute a command on the host as a synchronous child process.
host_env
Calls the get_env_var or set_env_var host function to manage environment variables on the host.
host_log
Calls the host_log host function to log a message to the host’s terminal.
plugin_err
Return an error message wrapped in WithReturnCode , for use within #[plugin_fn].
real_path
Calls from_virtual_path on the host to convert the provided value to a real path from a virtual path.
send_request
Calls the send_request host function to send an HTTP request and return a response. Not OK responses must be handled by the guest.
virtual_path
Calls to_virtual_path on the host to convert the provided value to a virtual path from a real path.

Structs§

EmptyInput
Represents an empty input.
ExecCommandInput
Input passed to the exec_command host function.
ExecCommandOutput
Output returned from the exec_command host function.
FileLocator
A file system locator.
GitHubLocator
A GitHub release locator.
HostEnvironment
Information about the host environment (the current runtime).
HostLogInput
Input passed to the host_log host function.
Id
A compact string identifier for use within records, key lookups, and more. Supports unicode alphanumeric characters, forward slash /, period ., underscore _, and dash -. A leading @ is supported to support npm package names.
IdError
ID errors.
RegistryLocator
An OCI registry locator.
SendRequestInput
Input passed to the send_request host function.
SendRequestOutput
Output returned from the send_request host function.
TestEnvironment
Information about the current testing environment.
UrlLocator
A HTTPS URL locator.

Enums§

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

Statics§

ID_CLEAN_PATTERN
Pattern that removes unsupported characters from an identifier.
ID_PATTERN
Pattern that all identifiers are matched against. Supports unicode alphanumeric characters, forward slash /, period ., underscore _, and dash -. A leading @ is supported to support npm package names.

Functions§

add_host_paths
Append paths to the PATH environment variable on the host machine.
command_exists
Check whether a command exists or not on the host machine.
exec
Execute a command on the host with the provided input.
exec_captured
Execute a command on the host and capture its output (pipe).
exec_streamed
Execute a command on the host and stream its output to the console (inherit).
fetch
Fetch the requested input and return a response.
fetch_bytes
Fetch the provided URL and return the response as bytes.
fetch_json
Fetch the provided URL and deserialize the response as JSON.
fetch_text
Fetch the provided URL and return the response as text.
get_host_env_var
Return the value of an environment variable on the host machine.
get_host_environment
Return information about the host environment.
get_plugin_id
Return the ID for the current plugin.
get_test_environment
Return information about the testing environment.
into_real_path
Convert the provided path into a PathBuf instance, with the prefix resolved absolutely to the host.
into_virtual_path
Convert the provided path into a VirtualPath instance, with the prefix resolved to the WASM virtual whitelist.
load_git_tags
Load all Git tags from the provided remote URL. The git executable must exist on the host machine.
set_host_env_var
Set the value of an environment variable on the host machine.

Type Aliases§

AnyResult
Represents any result (using anyhow).