Crate extism

source ·

Modules§

Macros§

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

Structs§

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

Enums§

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

Constants§

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.
  • 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 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§

  • Returns a string containing the Extism version of the current runtime, this is the same as the Cargo package version
  • 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§

  • Raw WebAssembly values

Derive Macros§