HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
cloudflare
workerd
C++2022–2026
cloudflare / workerd

workerd

The JavaScript / Wasm runtime that powers Cloudflare Workers

30Distinct people
55Mentions
2Explicit recommenders
9.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The JavaScript / Wasm runtime that powers Cloudflare Workers

GitHub

Where it is used

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

What people are saying

You beat us to it! Been meaning to land this but got distracted. https://github.com/cloudflare/workerd/pull/6780 But honestly I love that there are multiple implementations now.

kentonv used a recommendation phrase. 2 indexed comments match. This is a phrase match, not a verdict.

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

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 10:56:20 AM 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 year55 dated mentions

Observed mentions: 2022-09-27 13:02:06 UTC to 2026-09-23 13:34:38 UTC.

051015202022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 10 mentions; 1 submissions, 9 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 11 mentions; 1 submissions, 10 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments20242025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 19 mentions; 0 submissions, 19 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

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
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC1019
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC11110
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC606
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC909
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC19019

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
👷 workerd, Cloudflare's JavaScript/Wasm Runtime workerd (pronounced: "worker-dee") is a JavaScript / Wasm server runtime based on the same code that powers Cloudflare Workers. You might use it: As an application server, to self-host applications designed for Cloudflare Workers. As a development tool, to develop and test such code locally. As a programmable HTTP proxy (forward or reverse), to efficiently intercept, modify, and route network requests. Introduction Design Principles Server-first: Designed for servers, not CLIs nor GUIs. Standard-based: Built-in APIs are based on web platform standards, such as fetch(). Nanoservices: Split your application into components that are decoupled and independently-deployable like microservices, but with performance of a local function call. When one nanoservice calls another, the callee runs in the same thread and process. Homogeneous deployment: Instead of deploying different microservices to different machines in your cluster, deploy all your nanoservices to every machine in the cluster, making load balancing much easier. Capability bindings: workerd configuration uses capabilities instead of global namespaces to connect nanoservices to each other and external resources. The result is code that is more composable -- and immune to SSRF attacks. Always backwards compatible: Updating workerd to a newer version will never break your JavaScript code. workerd's version number is simply a date, corresponding to the maximum "compatibility date" supported by that version. You can always configure your worker to a past date, and workerd will emulate the API as it existed on that date. Read the blog post to learn more about these principles. WARNING: workerd is not a hardened sandbox workerd tries to isolate each Worker so that it can only access the resources it is configured to access. However, workerd on its own does not contain suitable defense-in-depth against the possibility of implementation bugs. When using workerd to run possibly-malicious code, you must run it inside an appropriate secure sandbox, such as a virtual machine. The Cloudflare Workers hosting service in particular uses many additional layers of defense-in-depth. With that said, if you discover a bug that allows malicious code to break out of workerd, please submit it to Cloudflare's bug bounty program for a reward. Getting Started Supported Platforms In theory, workerd should work on any POSIX system that is supported by V8 and Windows. In practice, workerd is tested on: Linux and macOS (x86-64 and arm64 architectures) Windows (x86-64 architecture) On other platforms, you may have to do tinkering to make things work. Building workerd To build workerd, you need: Bazel If you use Bazelisk (recommended), it will automatically download and use the right version of Bazel for building workerd. On Linux, nothing else: the build downloads its own LLVM toolchain (clang, lld and libc++) and a Debian sysroot (see build/deps/llvm.MODULE.bazel), and uses no compiler or libraries from the host. On macOS: Xcode 26.6 installation (available on macOS 26 and higher). Building with just the Xcode Command Line Tools is not being tested, but should work too. On Windows: Install App Installer from the Microsoft Store for the winget package manager and then run install-deps.bat from an administrator prompt to install bazelisk, LLVM, and other dependencies required to build workerd on Windows. Add startup --output_user_root=C:/tmp to the .bazelrc file in your user directory. When developing at the command-line, run bazel-env.bat in your shell first to select tools and Windows SDK versions before running bazel. You may then build workerd at the command-line with: bazel build //src/workerd/server:workerd You can pass --config=release to compile in release mode: bazel build //src/workerd/server:workerd --config=release You can also build from within Visual Studio Code using the instructions in docs/vscode.md. The compiled binary will be located at bazel-bin/src/workerd/server/workerd. If you run a Bazel build before you've installed some dependencies (like Xcode), and then you install the dependencies, you must resync locally cached toolchains, or clean Bazel's cache, otherwise you might get strange errors: bazel fetch --configure --force If that fails, you can try: bazel clean --expunge The cache will now be cleaned and you can try building again. If you have a fairly recent clang packages installed you can build a more performant release version of workerd: bazel build --config=thin-lto //src/workerd/server:workerd Configuring workerd workerd is configured using a config file written in Cap'n Proto text format. For simple projects, workerd serve wrangler.jsonc also accepts a Wrangler config. main is bundled with esbuild, as Wrangler does. The supported fields are name, main, compatibility_date, compatibility_flags, vars, durable_objects, exports, migrations, no_bundle and $schema; any other field is an error. A simple "Hello World!" config file might look like: using Workerd = import "/workerd/workerd.capnp"; const config :Workerd.Config = ( services = [ (name = "main", worker = .mainWorker), ], sockets = [ # Serve HTTP on port 8080. ( name = "http", address = "*:8080", http = (), service = "main" ), ] ); const mainWorker :Workerd.Worker = ( serviceWorkerScript = embed "hello.js", compatibilityDate = "2023-02-28", # Learn more about compatibility dates at: # https://developers.cloudflare.com/workers/platform/compatibility-dates/ ); Where hello.js contains: addEventListener("fetch", event => { event.respondWith(new Response("Hello World")); }); Complete reference documentation is provided by the comments in workerd.capnp. There is also a library of sample config files. Running workerd To serve your config, do: workerd serve my-config.capnp For more details about command-line usage, use workerd --help. Prebuilt binaries are dis
Read the full README on GitHub

What Hacker News says

11 sources
I think this is for people who want to run their own cloudflare workers (sort of) and since nobody wants to run full node for that, they want a small runtime that just executes js/wasm in an isolated way. But I wonder why they don't tell me how I can be sure that this is safe or how it's safe. Surely I can't just trust them and it explicitly mentions that it still has file IO so clearly there is still work I need to do customize the isolation further. The reason why they dont show more info about this is probably because they don't really want you to use this to run it on your own, they are selling you on running things on their edge platform called "Wasmer Edge". So that's probably why this is so light on information.. the motivation isn't to get you to use this yourself, just to use this via their hosted edge platform. But then I wonder
Read the rest
why I wouldn't just use https://github.com/cloudflare/workerd which is also open source. Surely that is fast enough? If not then it should show some benchmarks? I suppose the performance claim is here: https://wasmer.io/products/edge#:~:text=Cloud-,Cold%20Startu...
In WinterJS
First major adopter of the new Sandbox API? Some very good tech comments happening in the last thread on Kuasar. https://news.ycombinator.com/item?id=35649189 It was a bit surprising to me that the model is a forking model, that each VM is it's own process. Got a great reply on that: > It is very insightful to point out that forking a wasm runtime may not be the best choice, actually this is because we chose the WasmEdge as our first supported wasm runtime, and it do not support redirecting the standard io fds, so we can only fork a new process and redefine the stdin/stdout/stderr to the named pipe. we already submit an issue to WasmEdge community, we may change the fork way to starting directly. For Wasmtime (we will support it later), there is no such constraint, and we will start runtime directly. Other good discussion on how much peop
Read the rest
le appreciate getting away from the much higher overhead per-container Shim v2 model! It strikes me that this could be an excellent starting place for a CloudFlare workerd js/wasm provider too. That's been a pet desire of mine, and this could drastically slash the effort required to experiment. https://github.com/cloudflare/workerd It's awesome to see thr container model maturing. Much better runtime behavior here. And the ability to nicely go beyond mini-Linux-containers into new frontiers is hella exciting.
In Huawei Open Sources Kuasar, a Rust-Based Container Runtime
The second scenario, mentioned in https://github.com/panva/jose/issues/355#issuecomment-102795..., seems much harder to work around. If a canceled request leaves a Promise hanging, how will you notice? It's unclear to me how workerd handles canceled tasks. Javascript Promises themselves don't have a concept of canceling as such, maybe they reject the promises for canceled requests? Or maybe they just throw away the tasks, without giving them any notice -- after all, the whole point seems to be to mitigate harm from bugs causing runaway processing like infinite loops. Can someone confirm what actually happens? I'm having trouble triggering this in an observable way without writing a custom HTTP client. https://github.com/cloudflare/workerd/blob/5d644d0189246a22e... https://github.com/cloudflare/workerd/blob/5d644d0189246a22e... I also don
Read the rest
't see anything in the Cloudflare docs that would say anything about how they terminate requests that are canceled. Since only individual requests get canceled, they have to leave the runtime instance alive, to process any other requests it's serving. `event.waitUntil` you buys you an extra 30 seconds. https://developers.cloudflare.com/workers/platform/limits/#c... https://developers.cloudflare.com/workers/runtime-apis/fetch...
In “The script will never generate a response” on Cloudflare Workers
It's more like Cloudflare forked nginx a long time ago, and is meanwhile in the very slow (like, decade-long) process of replacing it entirely. The Cloudflare Workers Runtime∗, for instance, is built directly around V8; it does not use nginx or any other existing web server stack. Many new features of Cloudflare are in turn built on Workers, and much of the old stack build on nginx is gradually being migrated to Workers. https://workers.dev https://github.com/cloudflare/workerd In another part of the stack, there is Pingora, another built-from-scratch web server focused on high-performance proxying and caching: https://blog.cloudflare.com/how-we-built-pingora-the-proxy-t... Even when using nginx, Cloudflare has rewritten or added big chunks of code, such as implementing HTTP/3: https://github.com/cloudflare/quiche And of course there is a
Read the rest
ton of business logic written in Lua on top of that nginx base. Though arguably, Cloudflare's biggest piece of magic is the layer 3 network. It's so magical that people don't even think about it, it just works. Seamlessly balancing traffic across hundreds of locations without even varying IP addresses is, well, not easy. I could go on... automatic SSL certificate provisioning? DDoS protection? etc. These aren't nginx features. So while Cloudflare may have gotten started being more-or-less nginx-as-a-service I don't think you can really call it that anymore. ∗ I'm the tech lead for Cloudflare Workers.
In What is a CDN? How do CDNs work?

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.