Allocate a chunk of host memory visible to plugins via other extism host functions.
Returns the start address of the block.
-
Parameters
size: number | bigint
Returns bigint
getVariable
getVariable(name): null | PluginOutput
Read a variable from extism memory by name.
+
Parameters
size: number | bigint
Returns bigint
getVariable
getVariable(name): null | PluginOutput
Read a variable from extism memory by name.
Parameters
name: string
Returns null | PluginOutput
PluginOutput
-
read
read(addr): null | PluginOutput
Given an address in extism memory, return a PluginOutput that represents
+
read
read(addr): null | PluginOutput
Given an address in extism memory, return a PluginOutput that represents
a view of that memory. Returns null if the address is invalid.
Parameters
addr: number | bigint
Returns null | PluginOutput
bigint
-
setVariable
setVariable(name, value): bigint
Set a variable to a given string or byte array value. Returns the start
+
setVariable
setVariable(name, value): bigint
Set a variable to a given string or byte array value. Returns the start
address of the variable. The start address is reused when changing the
value of an existing variable.
Parameters
name: string
value: string | Uint8Array
Returns bigint
bigint
-
store
store(input): bigint
Store a string or Uint8Array value in extism memory.
+
store
store(input): bigint
Store a string or Uint8Array value in extism memory.
\ No newline at end of file
diff --git a/functions/createPlugin.html b/functions/createPlugin.html
index dd24415..7ad1c0b 100644
--- a/functions/createPlugin.html
+++ b/functions/createPlugin.html
@@ -11,4 +11,4 @@
Allocate a chunk of host memory visible to plugins via other extism host functions. +