Skip to content

sgns::runtime::binaryen::RuntimeExternalInterface

#include <runtime_external_interface.hpp>

Inherits from wasm::ShellExternalInterface

Public Functions

Name
RuntimeExternalInterface(const std::shared_ptr< extensions::ExtensionFactory > & extension_factory, std::shared_ptr< TrieStorageProvider > storage_provider)
wasm::Literal callImport(wasm::Function * import, wasm::LiteralList & arguments) override
std::shared_ptr< WasmMemory > memory() const

Public Functions Documentation

function RuntimeExternalInterface

explicit RuntimeExternalInterface(
    const std::shared_ptr< extensions::ExtensionFactory > & extension_factory,
    std::shared_ptr< TrieStorageProvider > storage_provider
)

Note: : some implementation details were taken from https://github.com/WebAssembly/binaryen/blob/master/src/shell-interface.h

function callImport

wasm::Literal callImport(
    wasm::Function * import,
    wasm::LiteralList & arguments
) override

memory externals ext_malloc

ext_free

storage externals

ext_clear_prefix

ext_clear_storage

ext_exists_storage

ext_get_allocated_storage

ext_get_storage_into

ext_storage_read_version_1

ext_set_storage

ext_blake2_256_enumerated_trie_root

ext_storage_changes_root

ext_storage_root

IO extensions

ext_print_hex

ext_logging_log_version_1

ext_print_num

ext_print_utf8

Cryptographic extensions ext_blake2_128

ext_blake2_256

ext_keccak_256

ext_ed25519_verify

ext_sr25519_verify

ext_twox_64

ext_twox_128

ext_twox_256

ext_chain_id

crypto version 1

ext_secp256k1_ecdsa_recover_v1

ext_secp256k1_ecdsa_recover_compressed_v1

function memory

inline std::shared_ptr< WasmMemory > memory() const

Updated on 2026-03-04 at 13:10:43 -0800