Skip to content

Commit

Permalink
Update export_native_api.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xwang98 authored Mar 5, 2020
1 parent eb1eb9d commit a325c6d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/export_native_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ static NativeSymbol native_symbols[] =
}
};

// ensure the memory and runtime initialization is finsihed
// before registering the native functions
bh_memory_init_with_pool(global_heap_buf, sizeof(global_heap_buf));
wasm_runtime_init();

int n_native_symbols = sizeof(native_symbols) / sizeof(NativeSymbol);
if (!wasm_runtime_register_natives("env",
Expand Down

0 comments on commit a325c6d

Please sign in to comment.