EVMC
loader.h
Go to the documentation of this file.
1// EVMC: Ethereum Client-VM Connector API.
2// Copyright 2018 The EVMC Authors.
3// Licensed under the Apache License, Version 2.0.
4
14#pragma once
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
21typedef struct evmc_vm* (*evmc_create_fn)(void);
22
28{
31
34
37
40
43
46
49
52
56};
57
95evmc_create_fn evmc_load(const char* filename, enum evmc_loader_error_code* error_code);
96
118struct evmc_vm* evmc_load_and_create(const char* filename, enum evmc_loader_error_code* error_code);
119
154struct evmc_vm* evmc_load_and_configure(const char* config,
155 enum evmc_loader_error_code* error_code);
156
170const char* evmc_last_error_msg(void);
171
172#ifdef __cplusplus
173}
174#endif
175
struct evmc_vm * evmc_load_and_configure(const char *config, enum evmc_loader_error_code *error_code)
Dynamically loads the EVMC module, then creates and configures the VM instance.
struct evmc_vm * evmc_load_and_create(const char *filename, enum evmc_loader_error_code *error_code)
Dynamically loads the EVMC module and creates the VM instance.
struct evmc_vm *(* evmc_create_fn)(void)
The function pointer type for EVMC create functions.
Definition: loader.h:21
const char * evmc_last_error_msg(void)
Returns the human-readable message describing the most recent error that occurred in EVMC loading sin...
evmc_create_fn evmc_load(const char *filename, enum evmc_loader_error_code *error_code)
Dynamically loads the EVMC module with a VM implementation.
evmc_loader_error_code
Error codes for the EVMC loader.
Definition: loader.h:28
@ EVMC_LOADER_SUCCESS
The loader succeeded.
Definition: loader.h:30
@ EVMC_LOADER_ABI_VERSION_MISMATCH
The ABI version of the VM instance has mismatched.
Definition: loader.h:45
@ EVMC_LOADER_CANNOT_OPEN
The loader cannot open the given file name.
Definition: loader.h:33
@ EVMC_LOADER_UNSPECIFIED_ERROR
This error value will be never returned by the EVMC loader, but can be used by users to init evmc_loa...
Definition: loader.h:55
@ EVMC_LOADER_INVALID_ARGUMENT
The invalid argument value provided.
Definition: loader.h:39
@ EVMC_LOADER_SYMBOL_NOT_FOUND
The VM create function not found.
Definition: loader.h:36
@ EVMC_LOADER_VM_CREATION_FAILURE
The creation of a VM instance has failed.
Definition: loader.h:42
@ EVMC_LOADER_INVALID_OPTION_NAME
The VM option is invalid.
Definition: loader.h:48
@ EVMC_LOADER_INVALID_OPTION_VALUE
The VM option value is invalid.
Definition: loader.h:51
The VM instance.
Definition: evmc.h:1134