Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Shim []byte
Shim is the DEFAULT TinyGo wasm_exec shim served at /_gothic/wasm_exec.js. It carries Gothic's manual GC reclamation (_releaseValue, called from _makeFuncWrapper) that force-frees dead js.Value ref-table slots, because the bundled TinyGo (0.41.1) ships syscall/js WITHOUT runtime finalizers — without this reclamation the _values table grows unbounded under repeated callbacks.
var StockShim []byte
StockShim is the wasm_exec shim WITHOUT the manual GC reclamation — it is Shim minus the _releaseValue method and the _makeFuncWrapper result-block, so _makeFuncWrapper reverts to plain stock TinyGo form. It MUST be paired with a TinyGo toolchain whose syscall/js provides real finalizers (finalizeRef); otherwise js.Value slots leak. With finalizers present, the manual reclamation in Shim would DOUBLE-manage the _values table and free a slot the finalizer still tracks — a use-after-free ("call to released function"). See the maintainer doc cli/docs/patched-tinygo-channel.md.
Functions ¶
func Selected ¶
func Selected() []byte
Selected returns the wasm_exec shim bytes the runtime should serve for this process: the stock variant when GOTHIC_WASM_EXEC=stock, else the manual-GC default.
func StockSelected ¶
func StockSelected() bool
StockSelected reports whether the stock (no manual-GC) shim is the active one for this process. Read once at start; see stockSelected.
Types ¶
This section is empty.