mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-22 13:11:32 +00:00
chore(runtime-c-api) Update C/C++ headers.
This commit is contained in:
@ -675,24 +675,6 @@ wasmer_import_object_iter_t *wasmer_import_object_iterate_functions(const wasmer
|
|||||||
*/
|
*/
|
||||||
wasmer_import_object_t *wasmer_import_object_new(void);
|
wasmer_import_object_t *wasmer_import_object_new(void);
|
||||||
|
|
||||||
/**
|
|
||||||
* Stop the execution of a host function, aka imported function. The
|
|
||||||
* function must be used _only_ inside a host function.
|
|
||||||
*
|
|
||||||
* The pointer to `wasmer_instance_context_t` is received by the host
|
|
||||||
* function as its first argument. Just passing it to `ctx` is fine.
|
|
||||||
*
|
|
||||||
* The error message must have a greater lifetime than the host
|
|
||||||
* function itself since the error is read outside the host function
|
|
||||||
* with `wasmer_last_error_message`.
|
|
||||||
*
|
|
||||||
* This function returns `wasmer_result_t::WASMER_ERROR` if `ctx` or
|
|
||||||
* `error_message` are null.
|
|
||||||
*
|
|
||||||
* This function never returns otherwise.
|
|
||||||
*/
|
|
||||||
wasmer_result_t wasmer_import_trap(const wasmer_instance_context_t *ctx, const char *error_message);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calls an instances exported function by `name` with the provided parameters.
|
* Calls an instances exported function by `name` with the provided parameters.
|
||||||
* Results are set using the provided `results` pointer.
|
* Results are set using the provided `results` pointer.
|
||||||
@ -998,6 +980,24 @@ const wasmer_trampoline_callable_t *wasmer_trampoline_buffer_get_trampoline(cons
|
|||||||
void *wasmer_trampoline_get_context(void);
|
void *wasmer_trampoline_get_context(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stop the execution of a host function, aka imported function. The
|
||||||
|
* function must be used _only_ inside a host function.
|
||||||
|
*
|
||||||
|
* The pointer to `wasmer_instance_context_t` is received by the host
|
||||||
|
* function as its first argument. Just passing it to `ctx` is fine.
|
||||||
|
*
|
||||||
|
* The error message must have a greater lifetime than the host
|
||||||
|
* function itself since the error is read outside the host function
|
||||||
|
* with `wasmer_last_error_message`.
|
||||||
|
*
|
||||||
|
* This function returns `wasmer_result_t::WASMER_ERROR` if `ctx` or
|
||||||
|
* `error_message` are null.
|
||||||
|
*
|
||||||
|
* This function never returns otherwise.
|
||||||
|
*/
|
||||||
|
wasmer_result_t wasmer_trap(const wasmer_instance_context_t *ctx, const char *error_message);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true for valid wasm bytes and false for invalid bytes
|
* Returns true for valid wasm bytes and false for invalid bytes
|
||||||
*/
|
*/
|
||||||
|
@ -542,22 +542,6 @@ wasmer_import_object_iter_t *wasmer_import_object_iterate_functions(const wasmer
|
|||||||
/// See also `wasmer_import_object_append`
|
/// See also `wasmer_import_object_append`
|
||||||
wasmer_import_object_t *wasmer_import_object_new();
|
wasmer_import_object_t *wasmer_import_object_new();
|
||||||
|
|
||||||
/// Stop the execution of a host function, aka imported function. The
|
|
||||||
/// function must be used _only_ inside a host function.
|
|
||||||
///
|
|
||||||
/// The pointer to `wasmer_instance_context_t` is received by the host
|
|
||||||
/// function as its first argument. Just passing it to `ctx` is fine.
|
|
||||||
///
|
|
||||||
/// The error message must have a greater lifetime than the host
|
|
||||||
/// function itself since the error is read outside the host function
|
|
||||||
/// with `wasmer_last_error_message`.
|
|
||||||
///
|
|
||||||
/// This function returns `wasmer_result_t::WASMER_ERROR` if `ctx` or
|
|
||||||
/// `error_message` are null.
|
|
||||||
///
|
|
||||||
/// This function never returns otherwise.
|
|
||||||
wasmer_result_t wasmer_import_trap(const wasmer_instance_context_t *ctx, const char *error_message);
|
|
||||||
|
|
||||||
/// Calls an instances exported function by `name` with the provided parameters.
|
/// Calls an instances exported function by `name` with the provided parameters.
|
||||||
/// Results are set using the provided `results` pointer.
|
/// Results are set using the provided `results` pointer.
|
||||||
///
|
///
|
||||||
@ -793,6 +777,22 @@ const wasmer_trampoline_callable_t *wasmer_trampoline_buffer_get_trampoline(cons
|
|||||||
void *wasmer_trampoline_get_context();
|
void *wasmer_trampoline_get_context();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/// Stop the execution of a host function, aka imported function. The
|
||||||
|
/// function must be used _only_ inside a host function.
|
||||||
|
///
|
||||||
|
/// The pointer to `wasmer_instance_context_t` is received by the host
|
||||||
|
/// function as its first argument. Just passing it to `ctx` is fine.
|
||||||
|
///
|
||||||
|
/// The error message must have a greater lifetime than the host
|
||||||
|
/// function itself since the error is read outside the host function
|
||||||
|
/// with `wasmer_last_error_message`.
|
||||||
|
///
|
||||||
|
/// This function returns `wasmer_result_t::WASMER_ERROR` if `ctx` or
|
||||||
|
/// `error_message` are null.
|
||||||
|
///
|
||||||
|
/// This function never returns otherwise.
|
||||||
|
wasmer_result_t wasmer_trap(const wasmer_instance_context_t *ctx, const char *error_message);
|
||||||
|
|
||||||
/// Returns true for valid wasm bytes and false for invalid bytes
|
/// Returns true for valid wasm bytes and false for invalid bytes
|
||||||
bool wasmer_validate(const uint8_t *wasm_bytes, uint32_t wasm_bytes_len);
|
bool wasmer_validate(const uint8_t *wasm_bytes, uint32_t wasm_bytes_len);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user