HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
GoogleChromeLabs
comlink
TypeScript2017–2025
GoogleChromeLabs / comlink

comlink

Comlink makes WebWorkers enjoyable.

13Distinct people
14Mentions
0Explicit recommenders
12.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Comlink makes WebWorkers enjoyable.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year14 dated mentions

Observed mentions: 2017-10-11 05:50:22 UTC to 2025-12-06 14:53:31 UTC.

012342017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC211
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC413
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC202
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC303
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC110

What Hacker News says

14 sources
I understand, but things like https://github.com/GoogleChromeLabs/comlink enable it. Similar to how iFrames don't have access to their parent page you need a facilitator. My question is why not use a js facilitator that could work in all browsers, rather than just Chrome. I find it an interesting choice that the author decided to invest in new iFrame technology rather than existing multi-thread technology in the browser.
In Show HN: Parallel DOM – Upgrade your DOM to be multithreaded
It's not oriented specifically at state-sync'ing, but Comlink[1] comes to mind. > Comlink.wrap(endpoint) and Comlink.expose(value, endpoint?) Comlink’s goal is to make exposed values from one thread available in the other. 'expose' exposes 'value' on endpoint, where endpoint is a postMessage-like interface. 'wrap' wraps the other end of the message channel and returns a proxy. The proxy will have all properties and functions of the exposed value, but access and invocations are inherently asynchronous. This means that a function that returns a number will now return a promise for a number. Creating & exposing an EventEmitter in the main thread then proxy'ing it on each other thread ought create a reasonably similar experience to this Tangle library. The docs themselves discuss some of the extra difficulties if one is trying to proxy DOM Ev
Read the rest
ents[2], talking about this as a common usage pattern, but which is complicated by DOM Events not being cloneable. For another example of Comlink in action, there's this blog post on using Redux across threads[3]. [1] https://www.npmjs.com/package/comlink [2] https://github.com/GoogleChromeLabs/comlink#transfer-handler... [3] https://dassur.ma/things/react-redux-comlink/
In Easy State Sync Across JavaScript Sandboxes (Frames, Workers, Threads, Webviews)
There's overhead to a process that doesn't exist with threads. You can definitely split your work across threads in JS using Workers, ServiceWorkers and the main thread. Most apps don't take advantage of this very well though. Using a separate thread gets you the same GC benefits. There have been some attempts to make it easier to use threads on the web like the excellent Comlink library: https://github.com/GoogleChromeLabs/comlink
In High-performance garbage collection for C++ V8 (2020)
Hey everyone, proposal author here :D Surprised to see this show up on HN _now_, since the WICG discussion[1] has been held a good while ago. The things that have been pointed out here are similar to the feedback we’ve gotten from other browser vendors. Most crucially: We might be conflating two separate improvements here. On the one hand, there’s the ergonomics feature of async-ifying remote value and on the other introducing custom worklets that can share OS threads. As a result, I have extracted the magic sauce from the tasklets polyfill into its own library “Comlink”[2] and I plan to write a couple of web apps using it to gather some perf data. With that data we can hopefully figure out if the ergonomics layer is worth standardizing. Same goes for the worklets. I’ll be using good old web workers and see how big the perf impact is. Wit
Read the rest
h that data we can hopefully figure out if we “just” need to optimize Workers or if there’s some gains that can only be reaped by the worklet approach. [1]: https://discourse.wicg.io/t/proposal-tasklets/2199 [2]: https://github.com/GoogleChromeLabs/comlink
In Tasklets: a more ergonomic solution to WebWorkers

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.