package extism
Library
Module
Module type
Parameter
Class
Class type
Host_function
represents the plugin that is currently running from inside a host function definition
Opaque type, wraps ExtismCurrentPlugin
, this value should never be stored, it is only valid from inside the host function definition
val params : t -> Val.Array.t
Get host function parameters array
val results : t -> Val.Array.t
Get host function results array
Represents a block of guest memory
val output_string : t -> ?index:int -> string -> unit
Return a string from a host function, this copies the string into memory and sets the results array at index
with the pointer to the allocated value
val output_bigstring : t -> ?index:int -> Bigstringaf.t -> unit
Return a bigstring from a host function, this copies the bigstring into memory and sets the results array at index
with the pointer to the allocated value
val input_string : ?index:int -> t -> string
Get a string argument, the parameter at index
should be an int64 value that points to the string in linear memory
val input_bigstring : ?index:int -> t -> Bigstringaf.t
Load a parameter directly from memory
Get parameter from params array at index
and return the converted result
Similar to input_exn
but raises an exception
Convert a value, allocate it and update the results array at index
module Memory_handle : sig ... end
Some helpter functions for reading/writing memory