spikes/wasm-phase0 — WASM-PROPOSAL Phase 0 (toolchain & runtime spike)
Validates the dynamic-linking foundation for the WASM unit runtime:
wasi-sdk PIC side modules + a host loader linking a core module and a unit
module at runtime with shared memory/table. Exit criterion passed; runtime
selected: Wasmtime. See FINDINGS.md for results and realunit-report.md
for the real-generated-unit compile log.
Everything builds and runs on k-uce (toolchains under /opt, artifacts
under /tmp/uce/wasm-phase0):
bash spikes/wasm-phase0/build_modules.sh # core.wasm + unit.wasm (wasi-sdk)
bash spikes/wasm-phase0/build_loader.sh # loader (Wasmtime C API)
/tmp/uce/wasm-phase0/loader # expect: PHASE0 EXIT CRITERION: PASS
Files:
core.cpp— core-module stand-in: owns memory/allocator/libc++, exports everything; includes the guest-side GOT.func resolver patternunit.cpp— unit stand-in: PIC, imports allocator/runtime, exercises GOT, cross-module C++ objects, function pointers, lambdasloader.cpp— minimal runtime linker (standard wasm-c-api): dylink.0 parsing, base allocation, GOT resolution, init sequencingwasm_inspect.py— dumps imports/exports/dylink.0 of a moduleFINDINGS.md— toolchain pins, WAMR rejection evidence, flag recipe, Phase 2/3 implicationsrealunit-report.md—collections.uce.cpp/hello.uce.cppcompiled as side modules (worker-agent log)