Units now run exclusively on wasm; the native generated-C++ -> clang -> .so -> dlopen path and its request-time fallback are removed. - Dispatch (linux_fastcgi.cpp): the 4 handle_complete branches + the CLI-socket path route every request through wasm (wasm_ready compiles cold/stale on demand); a wasm-unavailable unit now yields a clean error page (fail_wasm_unavailable / render_request_failure) instead of native execution. compiler_invoke / _cli / _websocket / _serve_http deleted. - compiler.cpp (-1274): removed the native .so compile (COMPILE_SCRIPT), load_shared_unit, dlopen/dlsym/dlclose, compiler_load_shared_unit, and the SharedUnit .so function-pointer fields (on_setup/on_render/on_component/ on_websocket/on_cli/on_once/on_init) in types.h/types.cpp. compile_shared_unit now builds only the .wasm side-module; the .uce preprocessor/parser front-end is kept (it emits the C++ the wasm compile consumes). - unit_call()/component()/once/init now resolve across units through the wasm host component resolver (uce_host_component_resolve) instead of native dlsym; configured runtime error pages render through the wasm backend. - Dropped the WASM_BACKEND_ENABLED feature flag and dead COMPILE_SCRIPT / COMPILE_WASM_UNITS config; unit ABI freshness tied to UCE_UNIT_ABI_VERSION; guard against serving a stale .wasm for a deleted source; retired the obsolete W5 native-vs-wasm toggle script. Docs updated. Implemented via the pi agent (with 3 delegated sub-reviews); independently re-verified on the build host: run_cli_tests --include-wasm-kill => 87 passed, 0 failed, 0 skipped. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
45 lines
2.1 KiB
C
45 lines
2.1 KiB
C
#pragma once
|
|
|
|
#define RENDER(X) extern "C" void __uce_render(X)
|
|
#define COMPONENT(X) extern "C" void __uce_component(X)
|
|
#define ONCE(X) extern "C" void __uce_once(X)
|
|
#define INIT(X) extern "C" void __uce_init(X)
|
|
#define WS(X) extern "C" void __uce_websocket(X)
|
|
#define CLI(X) extern "C" void __uce_cli(X)
|
|
#define SERVE_HTTP(X) extern "C" void __uce_serve_http(X)
|
|
#define EXPORT extern "C"
|
|
|
|
String preprocess_shared_unit(Request* context, SharedUnit* su);
|
|
String compiler_generated_cpp_path(Request* context, String source_file);
|
|
String compiler_generated_cpp_path(SharedUnit* su);
|
|
void setup_unit_paths(Request* context, SharedUnit* su, String file_name);
|
|
void compile_shared_unit(Request* context, SharedUnit* su);
|
|
SharedUnit* get_shared_unit(Request* context, String file_name, bool opt_so_optional = false);
|
|
String compiler_error_page_unit(Request* context, String config_key);
|
|
bool compiler_unit_compile_pending(Request* context, String file_name);
|
|
String compiler_site_directory(Request* context);
|
|
StringList compiler_scan_site_units(Request* context);
|
|
StringList compiler_list_known_units(Request* context);
|
|
void compiler_set_known_units(Request* context, StringList files);
|
|
void compiler_track_known_unit(Request* context, String file_name);
|
|
void compiler_untrack_known_unit(Request* context, String file_name);
|
|
bool compiler_unit_needs_recompile(Request* context, String file_name, bool* source_missing = 0);
|
|
DValue unit_info(String path = "");
|
|
StringList units_list();
|
|
bool unit_compile(String path = "");
|
|
|
|
SharedUnit* unit_load(String file_name);
|
|
void unit_render(String file_name);
|
|
void unit_render(String file_name, Request& context);
|
|
DValue* unit_call(String file_name, String function_name, DValue* call_param = 0);
|
|
String component_resolve(String name);
|
|
bool component_exists(String name);
|
|
void component_render(String name);
|
|
void component_render(String name, Request& context);
|
|
void component_render(String name, DValue props);
|
|
void component_render(String name, DValue props, Request& context);
|
|
String component(String name);
|
|
String component(String name, Request& context);
|
|
String component(String name, DValue props);
|
|
String component(String name, DValue props, Request& context);
|