Crate extism_pdk
source ·Re-exports§
pub use memory::Memory;
pub use memory::MemoryPointer;
pub use http::HttpResponse;
pub use serde_json as json;
Modules§
- Functions to read plug-in config
- Types and functions for making HTTP requests
- Functions to manipulate plug-in variables
Macros§
- The
encoding
macro can be used to create newtypes that implement a particular encoding for the inner value.
Structs§
- Base64 string
- The
Error
type, a wrapper around a dynamic error type. - HTTP request type Generic HTTP request structure
- Json encoding
MemoryHandle
describes where in memory a block of data is stored- Msgpack encoding
- Protobuf encoding
- Raw does no conversion, it just copies the memory directly. Note: This will only work for types that implement bytemuck::Pod
Enums§
- Logging levels
Traits§
FromBytes
is used to define how a type should be decoded when working with Extism memory. It is used for plugin output and host function input.ToBytes
is used to define how a type should be encoded when working with Extism memory. It is used for plugin input and host function output.
Functions§
- Get input bytes from host and convert into
T
- Get input bytes from host
- Set output for host
Type Aliases§
- The return type of a plugin function
- The return type of a
shared_fn
Attribute Macros§
host_fn
is used to import a host function from anextern
blockplugin_fn
is used to define an Extism callable function to exportshared_fn
is used to define a function that will be exported by a plugin but is not directly callable by an Extism runtime. These functions can be used for runtime linking and mocking host functions for tests. If direct access to Wasm native parameters is needed, then a bareextern "C" fn
should be used instead.