Crate kona_common

Crate kona_common 

Source
Expand description

§kona-common

This library offers utilities for developing verifiable client executables that may run on top of Fault Proof Virtual Machine targets.

  • The alloc_heap macro allows for statically allocating a heap of a certain size, and all client programs will need to run it if they require heap allocation. The alloc crate can be used for programs targeting any FPVM, but is optional.
  • The io module provides a high-level safe interface over the read, write, and exit syscalls on all available FPVM targets. While the FPVMs support a larger set of Linux syscalls, this crate looks to support the bare-minimum required for client programs to communicate back and forth with the host and exit properly. If a consumer of the library would like to extend the functionality of the ClientIO, an extension trait can be made for the ClientIO type in the io module.

Modules§

errors
Errors for the kona-common crate.
io
This module contains the ClientIO struct, which is a system call interface for the kernel.
malloc
This module contains an implementation of a basic memory allocator for client programs in running on an embedded device.

Macros§

alloc_heap
Initialize heap memory for the client program with the given size.

Enums§

FileDescriptor
File descriptors available to the client within the FPVM kernel.

Traits§

BasicKernelInterface
The BasicKernelInterface trait describes the functionality of several core system calls inside of the kernel.

Functions§

block_on
This function busy waits on a future until it is ready. It uses a no-op waker to poll the future in a thread-blocking loop.