Expand description
Extism C API
Structs§
ExtismVal
holds the type and value of a function argument/return
Statics§
- The return code used to specify a successful plugin call
Functions§
- Get the current plugin’s associated host context data. Returns null if call was made without host context.
- Returns a pointer to the memory of the currently running plugin NOTE: this should only be called from host functions.
- Allocate a memory block in the currently running plugin NOTE: this should only be called from host functions.
- Free an allocated memory block NOTE: this should only be called from host functions.
- Get the length of an allocated block NOTE: this should only be called from host functions.
- extism_error⚠DeprecatedGet the error associated with a
Plugin
- Free
ExtismFunction
- Create a new host function
- Set the namespace of an
ExtismFunction
- Enable a custom log handler, this will buffer logs until
extism_log_drain
is called Log level should be one of: info, error, trace, debug, warn - Calls the provided callback function for each buffered log line. This is only needed when
extism_log_custom
is used. - Set log file and level. The log level can be either one of: info, error, trace, debug, warn or a more complex filter like
extism=trace,cranelift=debug
The file will be created if it doesn’t exist. - Call a function
- Call a function with host context.
- Cancel a running plugin
- Get handle for plugin cancellation
- Update plugin config values.
- Get the error associated with a
Plugin
- Remove a plugin from the registry and free associated memory
- Returns true if
func_name
exists - Get a plugin’s ID, the returned bytes are a 16 byte buffer that represent a UUIDv4
- Create a new plugin with host functions, the functions passed to this function no longer need to be manually freed using
- Free the error returned by
extism_plugin_new
, errors returned fromextism_plugin_error
don’t need to be freed - Get a pointer to the output data
- Get the length of a plugin’s output data
- Reset the Extism runtime, this will invalidate all allocated memory
- Get the Extism version string
Type Aliases§
- Host function signature
- Log drain callback
Unions§
- A union type for host function argument/return values