#include #include "../wasmer.h" #include #include int main() { // Read the wasm file bytes FILE *file = fopen("sum.wasm", "r"); fseek(file, 0, SEEK_END); long len = ftell(file); uint8_t *bytes = malloc(len); fseek(file, 0, SEEK_SET); fread(bytes, 1, len, file); fclose(file); wasmer_module_t *module = NULL; wasmer_result_t compile_result = wasmer_compile(&module, bytes, len); printf("Compile result: %d\n", compile_result); assert(compile_result == WASMER_OK); printf("Destroy module\n"); wasmer_module_destroy(module); return 0; }