mirror of
https://github.com/Xahau/xahaud.git
synced 2026-07-23 15:10:10 +00:00
Introduce an engine-agnostic abstraction so that <wasmedge/wasmedge.h> is included only in WasmEdgeEngine.cpp, enabling future execution engines to be plugged in without touching Hook API implementation code. New files: - include/xrpl/hook/WasmTypes.h – GuestMemory, WasmValue, HostFunctionDecl - src/.../hook/detail/WasmEngine.h – IWasmEngine pure virtual interface, ExecutionResult, hookHostFunctionDecls() - src/.../hook/detail/WasmEdgeEngine.h/.cpp – WasmEdge implementation; the sole consumer of wasmedge.h Key changes: - Macro.h: replace WasmEdge_* types with engine-agnostic WasmValue/GuestMemory; DEFINE_HOOK_FUNCTION now returns HostCallStatus via a thin wrapper - applyHook.h: remove wasmedge.h include and HookExecutor class entirely - applyHook.cpp: call makeWasmEdgeEngine()->execute() at the single call site - SetHook.cpp, Change.cpp: call makeWasmEdgeEngine()->validate() for WASM validation instead of HookExecutor::validateWasm() No behavioral change; no Amendment required.