Pre-instantiate WASM core workers
This commit is contained in:
@@ -7,8 +7,7 @@
|
||||
|
||||
#include "../lib/wasm_trace.h"
|
||||
// The native server TU has the native connectors (sqlite/mysql) compiled in, so
|
||||
// the worker's host-side connector hostcalls are available here. The W3 CLI
|
||||
// driver does not define this and gets a named-trap stub for those imports.
|
||||
// the worker's host-side connector hostcalls are available here.
|
||||
#define UCE_WASM_HOST_CONNECTORS 1
|
||||
#include "worker.cpp"
|
||||
|
||||
@@ -70,6 +69,8 @@ static String wasm_backend_ensure_started(Request* context)
|
||||
|
||||
g_wasm_worker = new WasmWorker(wc);
|
||||
g_wasm_init_error = g_wasm_worker->init();
|
||||
if(g_wasm_init_error == "")
|
||||
g_wasm_init_error = wasm_worker_prepare(*g_wasm_worker);
|
||||
if(g_wasm_init_error != "")
|
||||
{
|
||||
delete g_wasm_worker;
|
||||
|
||||
Reference in New Issue
Block a user