-
Notifications
You must be signed in to change notification settings - Fork 824
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
3068: create-{exe,obj}: add documentations and header file generation for create-obj r=epilys a=epilys Co-authored-by: Manos Pitsidianakis <[email protected]>
- Loading branch information
Showing
5 changed files
with
144 additions
and
49 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "wasmer.h" | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
extern size_t WASMER_MODULE_LENGTH asm("WASMER_MODULE_LENGTH"); | ||
extern char WASMER_MODULE_DATA asm("WASMER_MODULE_DATA"); | ||
|
||
wasm_module_t* wasmer_module_new(wasm_store_t* store, const char* wasm_name) { | ||
wasm_byte_vec_t module_byte_vec = { | ||
.size = WASMER_MODULE_LENGTH, | ||
.data = (const char*)&WASMER_MODULE_DATA, | ||
}; | ||
wasm_module_t* module = wasm_module_deserialize(store, &module_byte_vec); | ||
|
||
return module; | ||
} | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
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