package extism

  1. Overview
  2. Docs

Module Current_plugin.Memory_blockSource

Some helpter functions for reading/writing memory

Sourceval to_val : memory_block -> Val.t

Convert memory block to Val

Sourceval of_val : t -> Val.t -> memory_block option

Convert Val to memory block

Sourceval of_val_exn : t -> Val.t -> memory_block

Convert Val to memory block, raises Invalid_argument if the value is not a pointer to a valid memory block

Sourceval get_string : t -> memory_block -> string

Get a string from memory stored at the provided offset

Sourceval get_bigstring : t -> memory_block -> Bigstringaf.t

Get a bigstring from memory stored at the provided offset

Sourceval set_string : t -> memory_block -> string -> unit

Store a string into memory at the provided offset

Sourceval set_bigstring : t -> memory_block -> Bigstringaf.t -> unit

Store a bigstring into memory at the provided offset

OCaml

Innovation. Community. Security.