Crate extism

Source

Modules§

convert
The extism-convert crate is used by the Rust SDK and Rust PDK to provide a shared interface for encoding and decoding values that can be passed to Extism function calls.
sdk
Extism C API

Macros§

host_fn
The host_fn macro is used to define typed host functions
typed_plugin
The typed_plugin macro is used to create a newtype wrapper around Plugin with methods defined for the specified functions.

Structs§

CancelHandle
A CancelHandle can be used to cancel a running plugin from another thread
CompiledPlugin
CurrentPlugin
CurrentPlugin stores data that is available to the caller in PDK functions, this should only be accessed from inside a host function
DebugOptions
Error
The Error type, a wrapper around a dynamic error type.
Function
Wraps raw host functions with some additional metadata and user data
Manifest
The Manifest type is used to configure the runtime and specify how to load modules.
Plugin
Plugin contains everything needed to execute a WASM function
PluginBuilder
PluginBuilder is used to configure and create Plugin instances
WasmMetadata
Provides additional metadata about a Webassembly module

Enums§

UserData
UserData is used to store additional data that gets passed into host function callbacks
ValType
An enumeration of all possible value types in WebAssembly. cbindgen:prefix-with-name
Wasm
The Wasm type specifies how to access a WebAssembly module
WasmInput
Defines an input type for Wasm data.

Constants§

EXTISM_ENV_MODULE
EXTISM_USER_MODULE
PTR
A wrapper around ValType::I64 to specify arguments that are pointers to memory blocks

Traits§

FromBytes
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.
FromBytesOwned
FromBytesOwned is similar to FromBytes but it doesn’t borrow from the input slice. FromBytes is automatically implemented for all types that implement FromBytesOwned.
ToBytes
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§

extism_version
Returns a string containing the Extism version of the current runtime, this is the same as the Cargo package version
set_log_callback
Sets a custom callback to handle logs, each line will be passed to the provided callback instead of being logged to a file. This initializes a default tracing_subscriber and should only be called once.

Type Aliases§

Val
Raw WebAssembly values

Derive Macros§

FromBytes
ToBytes