Pre-instantiate WASM core workers

This commit is contained in:
udo
2026-07-18 01:58:01 +00:00
parent f89e33e241
commit 72fd0dd53a
5 changed files with 103 additions and 219 deletions
+3 -2
View File
@@ -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;