-
Notifications
You must be signed in to change notification settings - Fork 821
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
271: feat: Implement `wasmer_module_serialize` and `wasmer_module_deserialize` functions in `runtime-c-api` r=Hywan a=Hywan This PR implements 5 new functions in the `runtime-c-api` crate: 1. `wasmer_module_serialize` to serialize a module into a `wasmer_serialized_module_t` type, 2. `wasmer_module_deserialize` to deserialize a serialized module, 3. `wasmer_serialized_module_bytes` to read the bytes in the `wasmer_serialized_module_t` type into a `wasmer_byte_array`, 4. `wasmer_serialized_module_from_bytes` to transform a `wasmer_byte_array` into a `wasmer_serialized_module_t`, 4. `wasmer_serialized_module_destroy` to destroy a `wasmer_serialized_module_t`. Documentation and a test suite have been added. We need to change the visibility of the `wasmer_runtime::default_compiler` function to public, since it is used in `runtime-c-api`. The new test suite `test-module-serialize` does a full roundtrip: A module is compiled, then serialized, then deserialized, to finally be instantiated and a function is called on it. Thoughts? Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
- Loading branch information
Showing
7 changed files
with
365 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.