polywrap_wasm.imports.subinvoke module
This module contains the subinvoke imports for the Wasm module.
- class polywrap_wasm.imports.subinvoke.WrapSubinvokeImports[source]
Bases:
BaseWrapImportsDefines the subinvoke family of imports for the Wasm module.
- wrap_subinvoke(uri_ptr: int, uri_len: int, method_ptr: int, method_len: int, args_ptr: int, args_len: int) bool[source]
Subinvoke a function of any wrapper from the Wasm module.
- Parameters:
uri_ptr (int) – The pointer to the uri string in memory.
uri_len (int) – The length of the uri string in memory.
method_ptr (int) – The pointer to the method string in memory.
method_len (int) – The length of the method string in memory.
args_ptr (int) – The pointer to the args bytes in memory.
args_len (int) – The length of the args bytes in memory.
- Returns:
True if the subinvocation was successful, False otherwise.
- wrap_subinvoke_error(ptr: int) None[source]
Write the subinvocation error message to shared memory at pointer to the Wasm allocated empty error message slot.
- Parameters:
ptr (int) – The pointer to the empty error message slot in memory.
- wrap_subinvoke_error_len() int[source]
Get the length of the subinocation error message in case of an error.