mirror of
https://github.com/fluencelabs/wasmer
synced 2025-07-30 23:02:06 +00:00
feat(runtime-c-api) Add the wasmer_serialized_module_from_bytes
function.
This function is required to transform a `wasmer_byte_array` into a `wasmer_serialized_module_t`. This is the complementary function of `wasmer_serialized_module_bytes`.
This commit is contained in:
@@ -537,6 +537,16 @@ wasmer_byte_array wasmer_serialized_module_bytes(const wasmer_serialized_module_
|
||||
*/
|
||||
void wasmer_serialized_module_destroy(wasmer_serialized_module_t *serialized_module);
|
||||
|
||||
/**
|
||||
* Transform a sequence of bytes into a serialized module.
|
||||
* The caller owns the object and should call `wasmer_serialized_module_destroy` to free it.
|
||||
* 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_serialized_module_from_bytes(wasmer_serialized_module_t **serialized_module,
|
||||
const wasmer_byte_array *serialized_module_bytes);
|
||||
|
||||
/**
|
||||
* Frees memory for the given Table
|
||||
*/
|
||||
|
Reference in New Issue
Block a user