denoland / denoland/fastwebsockets

What prevents supporting a sync/blocking API?

Open
#130 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.1k
Forks
112
PR merge metrics
No merged PRs in 30d

Description

Issue #90 was closed with "blocking (synchronous) API is not a goal for fastwebsockets" — curious about the reasoning behind this.

Is the core frame parser fundamentally tied to `AsyncRead + AsyncWrite`, or is it more of a scoping/maintenance decision?

Asking because we run latency-sensitive WebSocket consumers on CPU-pinned threads with non-blocking `TcpStream` + epoll busy-polling (no async runtime). The frame parsing performance of fastwebsockets is very appealing, but wrapping it in a single-threaded tokio runtime adds indirection we'd prefer to avoid.

If the frame codec were generic over `Read + Write` (with the async variant as a thin wrapper), it would open up fastwebsockets to a wider set of use cases without changing the async API. Happy to contribute if this is something you'd consider.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the core frame parser and its AsyncRead + AsyncWrite bounds, then compare those requirements with the proposed Read + Write abstraction and the existing async API. Done would require a clear maintainer decision on whether a synchronous API fits the project's goals and an agreed implementation scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.