Expand description
Download, resolve, and manage Extism WASM plugins.
Re-exports§
pub use warpgate_api as api;
Modules§
- host
- Host functions that are executed on the host machine, and are exposed to WASM plugins (the guest) through the PDKs.
- test_
utils - Utilities for locating and testing WASM plugins.
Structs§
- Data
Locator - An inline data locator.
- File
Locator - A file system locator.
- GitHub
Locator - A GitHub release locator.
- Http
Client - An HTTP(S) client with middleware that wraps
reqwest::Client. - Http
Downloader - A downloader that uses our internal HTTP(S) client.
- Http
Options - Configures the HTTP(S) client used for making requests.
- 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.
- Loaded
Plugin - A plugin that has been loaded with
PluginLoader. - Netrc
Middleware - HTTP client middleware that applies credentials from
the user’s
.netrcfile to each request. - OciClient
- An OCI client that wraps
oci_client::Client. - Plugin
Container - A container around Extism’s
PluginandManifesttypes that provides convenience methods for calling and caching functions from the WASM plugin. It also provides additional methods for easily working with WASI and virtual paths. - Plugin
Loader - A system for loading plugins from a locator strategy,
and caching the plugin file (
.wasm) to the host’s file system. - Plugin
Manifest - The
Manifesttype is used to configure the runtime and specify how to load modules. - Real
Path - Represents a real absolute path on the host system.
- Registry
Config - Configures an individual plugin registry.
- Registry
Locator - An OCI registry locator.
- UrlLocator
- A HTTPS URL locator.
- Virtual
Path - Represents a virtual absolute path on the guest system.
Enums§
- Plugin
Locator - Strategies and protocols for locating plugins.
- Plugin
Locator Error - Errors during plugin locator parsing.
- Warpgate
Http Client Error - HTTP(S) client errors.
- Warpgate
Loader Error - Loader errors.
- Warpgate
Plugin Error - Plugin/runtime errors.
- Wasm
- The
Wasmtype specifies how to access a WebAssembly module
Constants§
- WASM_
LAYER_ MEDIA_ TYPE_ JSON - Media type for a JSON file layer in an OCI image.
- WASM_
LAYER_ MEDIA_ TYPE_ MARKDOWN - Media type for a Markdown file layer in an OCI image.
- WASM_
LAYER_ MEDIA_ TYPE_ TAR - Media type for an uncompressed tarball layer in an OCI image.
- WASM_
LAYER_ MEDIA_ TYPE_ TAR_ GZIP - Media type for a gzip compressed tarball layer in an OCI image.
- WASM_
LAYER_ MEDIA_ TYPE_ TAR_ ZSTD - Media type for a zstd compressed tarball layer in an OCI image.
- WASM_
LAYER_ MEDIA_ TYPE_ TOML - Media type for a TOML file layer in an OCI image.
- WASM_
LAYER_ MEDIA_ TYPE_ WASM - Media type for a WASM file layer in an OCI image.
- WASM_
LAYER_ MEDIA_ TYPE_ YAML - Media type for a YAML file layer in an OCI image.
Functions§
- create_
http_ client - Create an HTTP(S) client that’ll be used for downloading files.
- create_
http_ client_ with_ options - Create an HTTP(S) client with the provided options, that’ll be used for downloading files.
- create_
oci_ client_ with_ options - Create an OCI client with the provided options, that’ll be used for interacting with OCI registries.
- download_
from_ url_ to_ file - Download a file from the provided URL, with the provided HTTP(S) client, and save it to a destination location.
- extract_
file_ name_ from_ url - Attempt to extract a file name from the provided URL, which can be used for caching or temporary file creation.
- inject_
default_ manifest_ config - Inject our default configuration into the provided plugin
Manifest. This will setplugin_id,host_environment, andvirtual_pathsfor use within PDKs. - move_
or_ unpack_ file - If the temporary file is an archive, unpack it into the destination, otherwise move the file into the destination.
Type Aliases§
- Offline
Checker - A function that checks whether the host has no internet connection (is offline).
- OnCall
Fn - A callback that is executed before and after a plugin function call. Receives the function name, the input (before only), and the output (after only).