Crate moon_pdk Copy item path Source pub use clap ;
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. 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. 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. 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. Args Parse a set of arguments into a user-defined container. 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_extension_config Get configuration for the current extension plugin. 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. get_toolchain_config Get workspace-level configuration for the current toolchain plugin. 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. is_project_toolchain_enabled Return true if the project has the current plugin/toolchain enabled. is_project_toolchain_enabled_for Return true if the project has the provided toolchain enabled. load_git_tags Load all Git tags from the provided remote URL.
The git
executable must exist on the host machine. load_project Load a single project by ID. load_project_toolchain_config Load project-specific configuration for a toolchain by ID. load_projects Load multiple projects by ID. load_task Load a single task by target. load_tasks Load multiple tasks by target. load_toolchain_config Load configuration for a toolchain by ID. locate_root Locate the root directory that contains the provided file name,
by traversing upwards from the starting directory. locate_root_many Locate the root directory that contains the provided file name(s),
by traversing upwards from the starting directory. locate_root_many_with_check Locate the root directory that contains the provided file name(s),
by traversing upwards from the starting directory and running
the check function on each directory. If the check returns true,
the traversal will stop. locate_root_with_check Locate the root directory that contains the provided file name,
by traversing upwards from the starting directory and running
the check function on each directory. If the check returns true,
the traversal will stop. map_miette_error Map a miette
(or similar error) to an extism
Error. parse_args Parse the list of argument strings into flags, options, and
positionals, and assign the values to the provided Args
struct. parse_toolchain_config Parse workspace & project merged configuration for the current toolchain plugin. set_host_env_var Set the value of an environment variable on the host machine. AnyResult Represents any result (using anyhow
). Args Generates the Args
impl.