Released12 Aug 2026Commita1e16475Line0.10.x

v0.10.6

sigil-websocket v0.10.6

Notes

ws-receive-nowait now actually exists

v0.10.4 added ws-receive-nowait, a non-parking buffered receive, and it has never once worked. Calling it killed the calling process: an unbound-variable error on the native backend, and on bytecode the same error reported to stdout followed by exit 1, which is mute whenever stdout is a pipe nobody reads.

The cause is a paren miscount in connection.sgl that predates the feature. The run of closing parens at the end of ws-receive contains one that closes the library's (begin ...), so the begin ends there rather than at the end of the file. The file balances either way, so nothing ever complained.

That means ws-receive-nowait was defined at define-library clause level instead of inside the begin. Sigil's library parser silently discards clauses it does not recognize, so the define compiled to nothing at all, the export cell stayed undefined, module import skipped it, and the first call raised unbound. Two different-looking failures, one cause.

Anything appended to that file "before the final paren" since v0.10.3 landed in the same dead zone. ws-receive-nowait is the only export that did.

What ws-receive-nowait does, precisely

On the native path it returns a message that is already decodable in the connection buffer, and #f otherwise. It never reads the socket and never waits. This is what stops the second, third and fourth frames of a single socket read being stranded behind a quiet socket, since one read routinely yields several complete frames.

It does not fill the buffer itself. A caller that only ever calls ws-receive-nowait will drain a buffer nothing refills; pair it with ws-receive for the read. A one-socket-read extension is in progress and will ship separately.

A partial frame is not an error. need-more and decode errors both return #f, meaning "nothing for you right now", and the caller's next socket read completes the frame.

On the browser path ws-receive is already event-driven and never waits, so nowait delegates to it rather than duplicating logic that could drift.

Upgrading

If you pinned ^0.10 you already resolve this. If you tried ws-receive-nowait on 0.10.4 or 0.10.5 and concluded your own code was at fault: it was not, and it will work now.

The underlying compiler behavior is being addressed separately. A define at library-clause level should be a loud error rather than a silent no-op.

Commit

a1e16475643ff5ed6c5d90e74481f4318bc0d4e3

This commit is older than the 20 that keep a page here, so it has none. It is in the clone.

Releases