extism-0.5.0: Extism bindings
Safe HaskellSafe-Inferred
LanguageHaskell2010

Extism.CurrentPlugin

Synopsis

Documentation

memoryAlloc :: CurrentPlugin -> Word64 -> IO Word64 Source #

Allocate a new handle of the given size

memoryLength :: CurrentPlugin -> Word64 -> IO Word64 Source #

Get the length of a handle, returns 0 if the handle is invalid

memoryFree :: CurrentPlugin -> Word64 -> IO () Source #

Free allocated memory

memory :: CurrentPlugin -> IO (Ptr Word8) Source #

Access a pointer to the entire memory region

memoryOffset :: CurrentPlugin -> Word64 -> IO (Ptr Word8) Source #

Access a pointer the a specific offset in memory

memoryBytes :: CurrentPlugin -> Word64 -> IO ByteString Source #

Access the data associated with a handle as a ByteString

allocBytes :: CurrentPlugin -> ByteString -> IO Word64 Source #

Allocate memory and copy an existing ByteString into it