Skip to main content

Crate tari_template_abi

Crate tari_template_abi 

Source
Expand description

§Tari WASM module ABI (application binary interface)

This library provides types and encoding that allow low-level communication between the Tari WASM runtime and the WASM modules.

Modules§

rust
version

Structs§

ArgDef
CallHeader
CallInfo
FunctionDef
OwnedData
Takes ownership of a length-prefixed block of memory allocated by tari_alloc and provides access to the data. This is used when WASM is responsible for freeing memory.
PackedCallInfoReader
TemplateDefV1

Enums§

EngineOp
TemplateDef
Type

Constants§

ABI_TEMPLATE_DEF_GLOBAL_NAME
The name of the global export that defines the template definition
WASM_PTR_SIZE

Functions§

alloc_and_encode
Allocates a length-prefixed block of memory containing the encoded value and returns a pointer to that value. This memory should be freed using tari_free.
call_debug
Requests the engine to write debug data
call_engine
Calls the engine with the given operation and input, returning the decoded output.
on_panic
Safety
tari_alloc
Allocates a length-prefixed block of memory of length len + 4 bytes.
tari_debug
Safety
tari_engine
Safety
tari_free
Frees a block of memory allocated by tari_alloc.
wrap_ptr

Type Aliases§

FunctionIdent