Crates.io | mavryk-smart-rollup-core |
lib.rs | mavryk-smart-rollup-core |
version | 0.2.2 |
source | src |
created_at | 2024-07-30 09:43:03.969689 |
updated_at | 2024-07-30 09:43:03.969689 |
description | Low-level host function definitions & constants for Mavryk Smart Rollups. |
homepage | |
repository | https://gitlab.com/mavryk-network/mavryk-protocol.git |
max_upload_size | |
id | 1319608 |
size | 27,815 |
Core API for the virtual smart_rollup_core
WASM module, exposed by
Mavryk Smart Rollups.
In order for a kernel to do useful work, it must be able to read input from users, respond with output, and update its internal state. To do so, rollups make a set of C-style host functions available to kernels, which enable:
This crate provides the definitions of these host functions, including linking to the smart_rollup_core
WASM module.
In addition, various constants (such as error codes) used when interacting with these host functions, are defined here.
This crate exposes the host functions through the SmartRollupCore
trait, which is unsafe to use - as it makes no effort
to provide a safe rust API. A safe API is defined in the mavryk-smart-rollup-host
crate, as the Runtime
trait.
It's therefore recommended to use the Runtime
trait directly from the mavryk-smart-rollup-host
crate, or
alternatively directly through the mavryk-smart-rollup
top-level SDK crate.