Security & Threat Intelligence · 03.08.2026, 13:03 UTC
Workers RPC now works across Python and JavaScript
| Schweregrad | info |
|---|---|
| Kategorie | Security & Threat Intelligence |
| Quelle | Cloudflare Blog ↗ |
| Veröffentlicht | 03.08.2026 UTC |
Sicherheitsmeldung mit Schweregrad noch nicht bewertet. Technische Details im Tab „Originaltext“; empfohlene Schritte in der Checkliste.
Two years ago, we introduced Workers RPC, built on Cap’n Proto RPC. This made it possible for Workers to call other Workers and Durable Objects’ methods, return live objects and call their methods, return functions, streams and get all the benefits of a Remote Procedure Call (RPC) system, without defining schemas or adding any dependencies. We called it “JavaScript-native RPC” because it made using RPC feel native to the language.Last year, we made this work between web browsers and servers, and introduced Cap’n Web.Now we’re taking it cross-language.Normally, getting programs written in different languages to talk to each other is complicated: developers usually have to build custom APIs or adopt language-agnostic serialization formats like protobuf, so the two systems can understand each other. The RPC system built into Workers is able to translate across JavaScript and Python without any additional work.You can now call methods defined in a Python Worker from a JavaScript Worker and vice versa. You can share objects across Python and JavaScript, and call methods on a Python object from TypeScript. It all just works.If you define a method add() in a Worker written in TypeScript:…you can simply call it from Python:There are no dependencies needed. All you need to configure is a Service binding:So, what can you do with it?This RPC system allows you to build a complex multi-language system as if you are using a library. Here are some features of cross-language RPC.Cross-language RPC calls behave like ordinary function calls that return promises in JavaScript/TypeScript and …