vendor or upstream the spinel __wasm__ runtime patch
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
context
the WASM/edge path is proven (handler → wasm32-wasi → runs under wasmtime,
identical CGI contract). but it required ~38 lines of patches to spinel's
lib/sp_runtime.h, and that patch currently lives ONLY in the scratch dir
(/tmp/webframe-spike/lib-wasm/), not in this repo. so the wasm build is
not reproducible from a clean checkout.
the patch (all platform-shim, zero handler/compiler changes)
__wasm__branch in the platform include block (no ucontext/mman/wait;
mmap→mallocshim) — mirrors the existing_WIN32branch- WASI libc gaps: stub
malloc_trim(no-op),getppid(→0),
popen/pclose(→null) — all dead code on a handler path - fiber stubs:
sp_Fiber_*→sp_raiseif ever called (WASM has no
native stack-switching; CGI handlers never create a Fiber) - compile flag:
-mllvm -wasm-enable-sjlj(spinel uses setjmp/longjmp;
wasmtime supports the exception-handling proposal)
decision needed
- upstream a clean
__wasm__branch to matz/spinel (best — ~40
lines, benefits everyone, spinel may want WASI anyway), OR - vendor the patch in spin (a
wasm/dir + aspin build --wasm
that applies it to a pinned spinel), OR - both (carry a patch now, PR upstream later)
deliverable
spin build --wasm handler.rb produces a runnable .wasm from a clean
checkout, with the runtime patch sourced reproducibly. see
docs/spike-hosting.md for the full port writeup.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read docs/spike-hosting.md first, then inspect the referenced spinel lib/sp_runtime.h patch in /tmp/webframe-spike/lib-wasm/. Decide whether to upstream, vendor, or do both, and verify that spin build --wasm handler.rb produces a runnable .wasm from a clean checkout with the runtime patch sourced reproducibly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby, wasm
- Domain
- backend, build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100