mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
chore(runtime-c-api) Regenerate the header files.
This commit is contained in:
parent
86c41264a3
commit
25feef7384
@ -27,11 +27,9 @@ enum wasmer_value_tag {
|
||||
};
|
||||
typedef uint32_t wasmer_value_tag;
|
||||
|
||||
typedef struct wasmer_instance_context_t wasmer_instance_context_t;
|
||||
typedef struct {
|
||||
|
||||
typedef struct wasmer_instance_t wasmer_instance_t;
|
||||
|
||||
typedef struct wasmer_module_t wasmer_module_t;
|
||||
} wasmer_module_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@ -93,10 +91,18 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
} wasmer_instance_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
} wasmer_memory_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
} wasmer_instance_context_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
} wasmer_table_t;
|
||||
|
||||
typedef union {
|
||||
@ -147,7 +153,7 @@ wasmer_byte_array wasmer_export_descriptor_name(wasmer_export_descriptor_t *expo
|
||||
* Gets export descriptors for the given module
|
||||
* The caller owns the object and should call `wasmer_export_descriptors_destroy` to free it.
|
||||
*/
|
||||
void wasmer_export_descriptors(wasmer_module_t *module,
|
||||
void wasmer_export_descriptors(const wasmer_module_t *module,
|
||||
wasmer_export_descriptors_t **export_descriptors);
|
||||
|
||||
/**
|
||||
@ -173,7 +179,7 @@ int wasmer_export_descriptors_len(wasmer_export_descriptors_t *exports);
|
||||
* Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
* and `wasmer_last_error_message` to get an error message.
|
||||
*/
|
||||
wasmer_result_t wasmer_export_func_call(wasmer_export_func_t *func,
|
||||
wasmer_result_t wasmer_export_func_call(const wasmer_export_func_t *func,
|
||||
const wasmer_value_t *params,
|
||||
int params_len,
|
||||
wasmer_value_t *results,
|
||||
@ -185,7 +191,7 @@ wasmer_result_t wasmer_export_func_call(wasmer_export_func_t *func,
|
||||
* Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
* and `wasmer_last_error_message` to get an error message.
|
||||
*/
|
||||
wasmer_result_t wasmer_export_func_params(wasmer_export_func_t *func,
|
||||
wasmer_result_t wasmer_export_func_params(const wasmer_export_func_t *func,
|
||||
wasmer_value_tag *params,
|
||||
int params_len);
|
||||
|
||||
@ -195,7 +201,7 @@ wasmer_result_t wasmer_export_func_params(wasmer_export_func_t *func,
|
||||
* Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
* and `wasmer_last_error_message` to get an error message.
|
||||
*/
|
||||
wasmer_result_t wasmer_export_func_params_arity(wasmer_export_func_t *func, uint32_t *result);
|
||||
wasmer_result_t wasmer_export_func_params_arity(const wasmer_export_func_t *func, uint32_t *result);
|
||||
|
||||
/**
|
||||
* Sets the returns buffer to the parameter types of the given wasmer_export_func_t
|
||||
@ -203,7 +209,7 @@ wasmer_result_t wasmer_export_func_params_arity(wasmer_export_func_t *func, uint
|
||||
* Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
* and `wasmer_last_error_message` to get an error message.
|
||||
*/
|
||||
wasmer_result_t wasmer_export_func_returns(wasmer_export_func_t *func,
|
||||
wasmer_result_t wasmer_export_func_returns(const wasmer_export_func_t *func,
|
||||
wasmer_value_tag *returns,
|
||||
int returns_len);
|
||||
|
||||
@ -213,7 +219,8 @@ wasmer_result_t wasmer_export_func_returns(wasmer_export_func_t *func,
|
||||
* Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
* and `wasmer_last_error_message` to get an error message.
|
||||
*/
|
||||
wasmer_result_t wasmer_export_func_returns_arity(wasmer_export_func_t *func, uint32_t *result);
|
||||
wasmer_result_t wasmer_export_func_returns_arity(const wasmer_export_func_t *func,
|
||||
uint32_t *result);
|
||||
|
||||
/**
|
||||
* Gets wasmer_export kind
|
||||
@ -228,7 +235,7 @@ wasmer_byte_array wasmer_export_name(wasmer_export_t *export_);
|
||||
/**
|
||||
* Gets export func from export
|
||||
*/
|
||||
const wasmer_export_func_t *wasmer_export_to_func(wasmer_export_t *export_);
|
||||
const wasmer_export_func_t *wasmer_export_to_func(const wasmer_export_t *export_);
|
||||
|
||||
/**
|
||||
* Frees the memory for the given exports
|
||||
@ -290,7 +297,7 @@ wasmer_byte_array wasmer_import_descriptor_name(wasmer_import_descriptor_t *impo
|
||||
* Gets import descriptors for the given module
|
||||
* The caller owns the object and should call `wasmer_import_descriptors_destroy` to free it.
|
||||
*/
|
||||
void wasmer_import_descriptors(wasmer_module_t *module,
|
||||
void wasmer_import_descriptors(const wasmer_module_t *module,
|
||||
wasmer_import_descriptors_t **import_descriptors);
|
||||
|
||||
/**
|
||||
@ -330,7 +337,7 @@ const wasmer_import_func_t *wasmer_import_func_new(void (*func)(void *data),
|
||||
* Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
* and `wasmer_last_error_message` to get an error message.
|
||||
*/
|
||||
wasmer_result_t wasmer_import_func_params(wasmer_import_func_t *func,
|
||||
wasmer_result_t wasmer_import_func_params(const wasmer_import_func_t *func,
|
||||
wasmer_value_tag *params,
|
||||
int params_len);
|
||||
|
||||
@ -340,7 +347,7 @@ wasmer_result_t wasmer_import_func_params(wasmer_import_func_t *func,
|
||||
* Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
* and `wasmer_last_error_message` to get an error message.
|
||||
*/
|
||||
wasmer_result_t wasmer_import_func_params_arity(wasmer_import_func_t *func, uint32_t *result);
|
||||
wasmer_result_t wasmer_import_func_params_arity(const wasmer_import_func_t *func, uint32_t *result);
|
||||
|
||||
/**
|
||||
* Sets the returns buffer to the parameter types of the given wasmer_import_func_t
|
||||
@ -348,7 +355,7 @@ wasmer_result_t wasmer_import_func_params_arity(wasmer_import_func_t *func, uint
|
||||
* Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
* and `wasmer_last_error_message` to get an error message.
|
||||
*/
|
||||
wasmer_result_t wasmer_import_func_returns(wasmer_import_func_t *func,
|
||||
wasmer_result_t wasmer_import_func_returns(const wasmer_import_func_t *func,
|
||||
wasmer_value_tag *returns,
|
||||
int returns_len);
|
||||
|
||||
@ -358,7 +365,8 @@ wasmer_result_t wasmer_import_func_returns(wasmer_import_func_t *func,
|
||||
* Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
* and `wasmer_last_error_message` to get an error message.
|
||||
*/
|
||||
wasmer_result_t wasmer_import_func_returns_arity(wasmer_import_func_t *func, uint32_t *result);
|
||||
wasmer_result_t wasmer_import_func_returns_arity(const wasmer_import_func_t *func,
|
||||
uint32_t *result);
|
||||
|
||||
/**
|
||||
* Calls an instances exported function by `name` with the provided parameters.
|
||||
@ -379,7 +387,7 @@ wasmer_result_t wasmer_instance_call(wasmer_instance_t *instance,
|
||||
* The index is always 0 until multiple memories are supported.
|
||||
*/
|
||||
const wasmer_memory_t *wasmer_instance_context_memory(wasmer_instance_context_t *ctx,
|
||||
uint32_t memory_idx);
|
||||
uint32_t _memory_idx);
|
||||
|
||||
/**
|
||||
* Frees memory for the given Instance
|
||||
@ -480,7 +488,7 @@ void wasmer_module_destroy(wasmer_module_t *module);
|
||||
* Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
* and `wasmer_last_error_message` to get an error message.
|
||||
*/
|
||||
wasmer_result_t wasmer_module_instantiate(wasmer_module_t *module,
|
||||
wasmer_result_t wasmer_module_instantiate(const wasmer_module_t *module,
|
||||
wasmer_instance_t **instance,
|
||||
wasmer_import_t *imports,
|
||||
int imports_len);
|
||||
|
@ -24,11 +24,9 @@ enum class wasmer_value_tag : uint32_t {
|
||||
WASM_F64,
|
||||
};
|
||||
|
||||
struct wasmer_instance_context_t;
|
||||
struct wasmer_module_t {
|
||||
|
||||
struct wasmer_instance_t;
|
||||
|
||||
struct wasmer_module_t;
|
||||
};
|
||||
|
||||
struct wasmer_export_descriptor_t {
|
||||
|
||||
@ -88,10 +86,18 @@ struct wasmer_import_func_t {
|
||||
|
||||
};
|
||||
|
||||
struct wasmer_instance_t {
|
||||
|
||||
};
|
||||
|
||||
struct wasmer_memory_t {
|
||||
|
||||
};
|
||||
|
||||
struct wasmer_instance_context_t {
|
||||
|
||||
};
|
||||
|
||||
struct wasmer_table_t {
|
||||
|
||||
};
|
||||
@ -138,7 +144,7 @@ wasmer_byte_array wasmer_export_descriptor_name(wasmer_export_descriptor_t *expo
|
||||
|
||||
/// Gets export descriptors for the given module
|
||||
/// The caller owns the object and should call `wasmer_export_descriptors_destroy` to free it.
|
||||
void wasmer_export_descriptors(wasmer_module_t *module,
|
||||
void wasmer_export_descriptors(const wasmer_module_t *module,
|
||||
wasmer_export_descriptors_t **export_descriptors);
|
||||
|
||||
/// Frees the memory for the given export descriptors
|
||||
@ -156,7 +162,7 @@ int wasmer_export_descriptors_len(wasmer_export_descriptors_t *exports);
|
||||
/// Returns `wasmer_result_t::WASMER_OK` upon success.
|
||||
/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
/// and `wasmer_last_error_message` to get an error message.
|
||||
wasmer_result_t wasmer_export_func_call(wasmer_export_func_t *func,
|
||||
wasmer_result_t wasmer_export_func_call(const wasmer_export_func_t *func,
|
||||
const wasmer_value_t *params,
|
||||
int params_len,
|
||||
wasmer_value_t *results,
|
||||
@ -166,7 +172,7 @@ wasmer_result_t wasmer_export_func_call(wasmer_export_func_t *func,
|
||||
/// Returns `wasmer_result_t::WASMER_OK` upon success.
|
||||
/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
/// and `wasmer_last_error_message` to get an error message.
|
||||
wasmer_result_t wasmer_export_func_params(wasmer_export_func_t *func,
|
||||
wasmer_result_t wasmer_export_func_params(const wasmer_export_func_t *func,
|
||||
wasmer_value_tag *params,
|
||||
int params_len);
|
||||
|
||||
@ -174,13 +180,13 @@ wasmer_result_t wasmer_export_func_params(wasmer_export_func_t *func,
|
||||
/// Returns `wasmer_result_t::WASMER_OK` upon success.
|
||||
/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
/// and `wasmer_last_error_message` to get an error message.
|
||||
wasmer_result_t wasmer_export_func_params_arity(wasmer_export_func_t *func, uint32_t *result);
|
||||
wasmer_result_t wasmer_export_func_params_arity(const wasmer_export_func_t *func, uint32_t *result);
|
||||
|
||||
/// Sets the returns buffer to the parameter types of the given wasmer_export_func_t
|
||||
/// Returns `wasmer_result_t::WASMER_OK` upon success.
|
||||
/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
/// and `wasmer_last_error_message` to get an error message.
|
||||
wasmer_result_t wasmer_export_func_returns(wasmer_export_func_t *func,
|
||||
wasmer_result_t wasmer_export_func_returns(const wasmer_export_func_t *func,
|
||||
wasmer_value_tag *returns,
|
||||
int returns_len);
|
||||
|
||||
@ -188,7 +194,8 @@ wasmer_result_t wasmer_export_func_returns(wasmer_export_func_t *func,
|
||||
/// Returns `wasmer_result_t::WASMER_OK` upon success.
|
||||
/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
/// and `wasmer_last_error_message` to get an error message.
|
||||
wasmer_result_t wasmer_export_func_returns_arity(wasmer_export_func_t *func, uint32_t *result);
|
||||
wasmer_result_t wasmer_export_func_returns_arity(const wasmer_export_func_t *func,
|
||||
uint32_t *result);
|
||||
|
||||
/// Gets wasmer_export kind
|
||||
wasmer_import_export_kind wasmer_export_kind(wasmer_export_t *export_);
|
||||
@ -197,7 +204,7 @@ wasmer_import_export_kind wasmer_export_kind(wasmer_export_t *export_);
|
||||
wasmer_byte_array wasmer_export_name(wasmer_export_t *export_);
|
||||
|
||||
/// Gets export func from export
|
||||
const wasmer_export_func_t *wasmer_export_to_func(wasmer_export_t *export_);
|
||||
const wasmer_export_func_t *wasmer_export_to_func(const wasmer_export_t *export_);
|
||||
|
||||
/// Frees the memory for the given exports
|
||||
void wasmer_exports_destroy(wasmer_exports_t *exports);
|
||||
@ -235,7 +242,7 @@ wasmer_byte_array wasmer_import_descriptor_name(wasmer_import_descriptor_t *impo
|
||||
|
||||
/// Gets import descriptors for the given module
|
||||
/// The caller owns the object and should call `wasmer_import_descriptors_destroy` to free it.
|
||||
void wasmer_import_descriptors(wasmer_module_t *module,
|
||||
void wasmer_import_descriptors(const wasmer_module_t *module,
|
||||
wasmer_import_descriptors_t **import_descriptors);
|
||||
|
||||
/// Frees the memory for the given import descriptors
|
||||
@ -263,7 +270,7 @@ const wasmer_import_func_t *wasmer_import_func_new(void (*func)(void *data),
|
||||
/// Returns `wasmer_result_t::WASMER_OK` upon success.
|
||||
/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
/// and `wasmer_last_error_message` to get an error message.
|
||||
wasmer_result_t wasmer_import_func_params(wasmer_import_func_t *func,
|
||||
wasmer_result_t wasmer_import_func_params(const wasmer_import_func_t *func,
|
||||
wasmer_value_tag *params,
|
||||
int params_len);
|
||||
|
||||
@ -271,13 +278,13 @@ wasmer_result_t wasmer_import_func_params(wasmer_import_func_t *func,
|
||||
/// Returns `wasmer_result_t::WASMER_OK` upon success.
|
||||
/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
/// and `wasmer_last_error_message` to get an error message.
|
||||
wasmer_result_t wasmer_import_func_params_arity(wasmer_import_func_t *func, uint32_t *result);
|
||||
wasmer_result_t wasmer_import_func_params_arity(const wasmer_import_func_t *func, uint32_t *result);
|
||||
|
||||
/// Sets the returns buffer to the parameter types of the given wasmer_import_func_t
|
||||
/// Returns `wasmer_result_t::WASMER_OK` upon success.
|
||||
/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
/// and `wasmer_last_error_message` to get an error message.
|
||||
wasmer_result_t wasmer_import_func_returns(wasmer_import_func_t *func,
|
||||
wasmer_result_t wasmer_import_func_returns(const wasmer_import_func_t *func,
|
||||
wasmer_value_tag *returns,
|
||||
int returns_len);
|
||||
|
||||
@ -285,7 +292,8 @@ wasmer_result_t wasmer_import_func_returns(wasmer_import_func_t *func,
|
||||
/// Returns `wasmer_result_t::WASMER_OK` upon success.
|
||||
/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
/// and `wasmer_last_error_message` to get an error message.
|
||||
wasmer_result_t wasmer_import_func_returns_arity(wasmer_import_func_t *func, uint32_t *result);
|
||||
wasmer_result_t wasmer_import_func_returns_arity(const wasmer_import_func_t *func,
|
||||
uint32_t *result);
|
||||
|
||||
/// Calls an instances exported function by `name` with the provided parameters.
|
||||
/// Results are set using the provided `results` pointer.
|
||||
@ -302,7 +310,7 @@ wasmer_result_t wasmer_instance_call(wasmer_instance_t *instance,
|
||||
/// Gets the memory within the context at the index `memory_idx`.
|
||||
/// The index is always 0 until multiple memories are supported.
|
||||
const wasmer_memory_t *wasmer_instance_context_memory(wasmer_instance_context_t *ctx,
|
||||
uint32_t memory_idx);
|
||||
uint32_t _memory_idx);
|
||||
|
||||
/// Frees memory for the given Instance
|
||||
void wasmer_instance_destroy(wasmer_instance_t *instance);
|
||||
@ -377,7 +385,7 @@ void wasmer_module_destroy(wasmer_module_t *module);
|
||||
/// Returns `wasmer_result_t::WASMER_OK` upon success.
|
||||
/// Returns `wasmer_result_t::WASMER_ERROR` upon failure. Use `wasmer_last_error_length`
|
||||
/// and `wasmer_last_error_message` to get an error message.
|
||||
wasmer_result_t wasmer_module_instantiate(wasmer_module_t *module,
|
||||
wasmer_result_t wasmer_module_instantiate(const wasmer_module_t *module,
|
||||
wasmer_instance_t **instance,
|
||||
wasmer_import_t *imports,
|
||||
int imports_len);
|
||||
|
Loading…
Reference in New Issue
Block a user