post-W7 cleanup
This commit is contained in:
@@ -826,6 +826,8 @@ FastCGIServer::process_http_request(FastCGIRequest& request, String& data)
|
||||
request.params["SCRIPT_FILENAME"] = real_candidate;
|
||||
}
|
||||
|
||||
// Any .uce unit may expose WS(Request&). The runtime accepts WebSocket
|
||||
// upgrades based on HTTP headers and dispatches messages to that handler.
|
||||
if(to_lower(request.params["HTTP_UPGRADE"]) == "websocket")
|
||||
{
|
||||
Connection* connection = client_sockets[request.resources.client_socket];
|
||||
|
||||
@@ -645,7 +645,7 @@ StringList regex_split(String pattern, String subject, String flags)
|
||||
// PCRE2 is not compiled into the wasm core; regex runs host-side (the host
|
||||
// already links libpcre2). One UCEB1-marshalled hostcall carries the request
|
||||
// {op,pattern,subject,flags,replacement} in and the result tree out — the host
|
||||
// runs the real regex_* and packs the answer. See uce_host_regex in
|
||||
// runs the native regex_* and packs the answer. See uce_host_regex in
|
||||
// src/wasm/worker.cpp.
|
||||
extern "C" size_t uce_host_regex(const char* in, size_t in_len, char* out, size_t cap);
|
||||
|
||||
|
||||
+1
-1
@@ -298,7 +298,7 @@ StringList ws_connections(String scope) { (void)scope; return(context ? context-
|
||||
u64 ws_connection_count(String scope) { return(ws_connections(scope).size()); }
|
||||
// The wasm workspace owns no connections; ws_send/ws_close record dispatch
|
||||
// commands (same shape as the native websocket_exec capture) that the host
|
||||
// carries back to the broker, which sends them over the real connections.
|
||||
// carries back to the broker, which sends them over the client connections.
|
||||
bool ws_send(String message, bool binary, String scope)
|
||||
{
|
||||
if(!context)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// wasm workspace. The legacy native dlopen execution path has been removed.
|
||||
|
||||
#include "../lib/wasm_trace.h"
|
||||
// The native server TU has the real connectors (sqlite/mysql) compiled in, so
|
||||
// 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.
|
||||
#define UCE_WASM_HOST_CONNECTORS 1
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// Production WASM W1 core entrypoint.
|
||||
//
|
||||
// This file deliberately includes the real UCE runtime amalgamation with
|
||||
// This file deliberately includes the production UCE runtime amalgamation with
|
||||
// __UCE_WASM_CORE__ enabled. Native-only pieces are carved out in the runtime
|
||||
// sources, while the workspace-owned DValue ABI and output plumbing are built
|
||||
// into core.wasm.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// W3 CLI driver — the exit gate for WASM-PROPOSAL §9.1 W3.
|
||||
//
|
||||
// Serves real requests through the production workspace runtime
|
||||
// (src/wasm/worker.cpp): UCEB1 context in → core + lazily loaded real
|
||||
// Serves requests through the production workspace runtime
|
||||
// (src/wasm/worker.cpp): UCEB1 context in → core + lazily loaded
|
||||
// generated units → body/response-meta out. Each --repeat gets a fresh
|
||||
// workspace, proving birth/drop. An epoch ticker thread enforces the CPU
|
||||
// budget; the store limiter enforces memory; traps come back as collapsed
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
// W3 — production wasm workspace runtime + membrane (WASM-PROPOSAL §6, §7).
|
||||
//
|
||||
// One workspace per request: a fresh Wasmtime store holding the core module
|
||||
// instance (real uce_lib carve-out, owns memory/allocator/DValue) plus unit
|
||||
// instance (production uce_lib carve-out, owns memory/allocator/DValue) plus unit
|
||||
// PIC side modules loaded lazily — including mid-request via the
|
||||
// uce_host_component_resolve hostcall, which is how component()/unit_render()
|
||||
// inside the guest trigger dynamic loading.
|
||||
@@ -1691,7 +1691,7 @@ private:
|
||||
#ifdef UCE_WASM_HOST_CONNECTORS
|
||||
if(mod == "env" && name == "uce_host_sqlite")
|
||||
return(add([self](Caller, Span<const Val> args, Span<Val> results) -> Result<std::monostate, Trap> {
|
||||
// {op,handle,path,query,params} in → result out. The real native
|
||||
// {op,handle,path,query,params} in → result out. The native
|
||||
// connector runs host-side; connections live in the workspace
|
||||
// handle table (handle = 1-based index).
|
||||
String encoded;
|
||||
@@ -2030,7 +2030,7 @@ private:
|
||||
if(mod == "env" && name == "uce_host_regex")
|
||||
return(add([self](Caller, Span<const Val> args, Span<Val> results) -> Result<std::monostate, Trap> {
|
||||
// {op,pattern,subject,flags,replacement} in (UCEB1) → result out.
|
||||
// PCRE2 lives host-side; this runs the real native regex_*.
|
||||
// PCRE2 lives host-side; this runs the native regex_*.
|
||||
String encoded;
|
||||
self->hostcall_read(args[0].i32(), args[1].i32(), encoded);
|
||||
DValue request;
|
||||
|
||||
Reference in New Issue
Block a user