//go:build js && wasm package runtime import ( "internal/task" "unsafe" ) // WASM stubs for native-only pipe channel and domain functions. // On WASM, spawn uses SAB channels (spawn_wasm.mx); pipe-bound channels // do not exist. pipeBoundFd is always 0 so the guards in chan.mx never // fire, but the symbols must exist for compilation. func PipeChanCloseSignal(_ *channel) {} func (ch *channel) tryPipeSend(_ unsafe.Pointer) bool { return false } func (ch *channel) tryPipeRecv(_ unsafe.Pointer) (received, ok bool) { return false, false } func pipeSelectRecheck(_ *task.Task, _ []chanSelectState, _ unsafe.Pointer) bool { return false } // domainShutdownAll is a no-op on WASM: no OS child processes. func domainShutdownAll() {} // PipeFDCanSend always returns true on WASM (SAB channels are unbounded). func PipeFDCanSend(_ int32) bool { return true }