diff --git a/doc/export_native_api.md b/doc/export_native_api.md index 308d3f56..970af75f 100644 --- a/doc/export_native_api.md +++ b/doc/export_native_api.md @@ -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",