After #17 (live mem.buffer aliasing + TextDecoder DataView support), a Go
GOOS=js GOARCH=wasm module boots through syscall/js and reaches its program
init, but then panics:
panic: syscall/js: call of Value.Get on undefined
goroutine 1 [running]:
syscall/js.Value.Get(...)
Instrumenting syscall/js.valueGet shows the property-access sequence right
before the panic:
Object, Array, process, path, fs, constants, Uint8Array
i.e. Go's runtime/os init reads globalThis.process, globalThis.path,
globalThis.fs, then fs.constants — one of these (or a member such as
fs.constants) is undefined, so the next .Get panics.
This is node-shim completeness, not the WASM runtime — the live-memory and
TextDecoder fixes in #17 are what get execution this far. To run Go modules,
QuickBEAM's node API surface needs the globals/members Go's wasm_exec.js
expects (process, path, a fs exposing constants, …), or
wasm_exec.js's own fallback shims need to be reachable.
A 12 MB Go signer module reproduces it. Filed from the work fork
ZenHive/quickbeam; the two
upstream-relevant runtime fixes are in #17.
After #17 (live
mem.bufferaliasing +TextDecoderDataViewsupport), a GoGOOS=js GOARCH=wasmmodule boots throughsyscall/jsand reaches its programinit, but then panics:
Instrumenting
syscall/js.valueGetshows the property-access sequence rightbefore the panic:
i.e. Go's runtime/os init reads
globalThis.process,globalThis.path,globalThis.fs, thenfs.constants— one of these (or a member such asfs.constants) isundefined, so the next.Getpanics.This is node-shim completeness, not the WASM runtime — the live-memory and
TextDecoderfixes in #17 are what get execution this far. To run Go modules,QuickBEAM's node API surface needs the globals/members Go's
wasm_exec.jsexpects (
process,path, afsexposingconstants, …), orwasm_exec.js's own fallback shims need to be reachable.A 12 MB Go signer module reproduces it. Filed from the work fork
ZenHive/quickbeam; the two
upstream-relevant runtime fixes are in #17.