Cloudflare Workers Embrace Multi-Language RPC

Cloudflare Workers now support cross-language RPC between JavaScript and Python, simplifying multi-language app development on the edge.

Diagram showing JavaScript and Python Workers communicating via RPC.
Cloudflare
Visual TL;DR
Multi-language app complexityDriver
traditionally integrating services written in different programming languages has been a significant challenge
Cloudflare Workers RPCCore
expands existing Workers RPC to enable cross-language communication between JavaScript and Python
From the article 8 mentionsCloudflare is breaking down language barriers for its serverless Workers platform.
Seamless JS-PythonEffect
functions and objects defined in one language can be called directly from another
Pyodide and Type ConversionCore
the system leverages Pyodide for Python execution and handles type conversion automatically
From the article 2 mentionsPyodide's Foreign Function Interface (FFI) inherently handles the translation of types between JavaScript and Python.
No complex interoperabilityEffect
developers no longer need to manage complex interoperability layers between different languages
From the article 2 mentionsThis new capability allows functions and objects defined in one language to be called directly from another, without requiring developers to manage complex interoperability layers.
Simplified Edge DevelopmentOutcome
simplifies multi-language application development directly on the Cloudflare Workers edge platform
From the articleThis move aligns with Cloudflare's broader strategy to make its edge computing platform a versatile environment for modern application development.
True Multi-language AppsOutcome
From the articleThe latest development, detailed on the Cloudflare blog, marks a significant step towards true multi-language development within the Workers environment.
Contents(3)

Cloudflare is breaking down language barriers for its serverless Workers platform. Developers can now build applications that seamlessly integrate JavaScript and Python code, thanks to the expansion of Workers RPC. This new capability allows functions and objects defined in one language to be called directly from another, without requiring developers to manage complex interoperability layers.

Introduced two years ago, Workers RPC initially enabled JavaScript Workers to communicate with each other and with Durable Objects. The system, built on Cap’n Proto RPC, offered a JavaScript-native way to handle remote procedure calls. Last year, Cloudflare extended this to browser-to-server communication with Cap’n Web. The latest development, detailed on the Cloudflare blog, marks a significant step towards true multi-language development within the Workers environment.

Bridging the Language Divide

Traditionally, integrating services written in different programming languages has been a significant hurdle. Developers often resort to building custom APIs, which can be time-consuming and error-prone. Alternatively, they adopt language-agnostic serialization formats like Protocol Buffers, which requires schema definitions and adds dependencies. Workers RPC bypasses these complexities.

Now, a JavaScript Worker can invoke a method defined in a Python Worker, and vice versa. This means developers can share objects and call methods across these languages as if they were part of the same codebase. For instance, a TypeScript Worker exporting an `add` function can be called directly from Python. The configuration involves a simple service binding, abstracting away the underlying communication details.

How It Works: Pyodide and Type Conversion

The core of this cross-language functionality lies in Pyodide, the CPython interpreter compiled to WebAssembly that powers Python Workers. Pyodide's Foreign Function Interface (FFI) inherently handles the translation of types between JavaScript and Python. When a Python Worker communicates with a JavaScript Worker via service bindings, Pyodide's FFI transparently converts objects during RPC calls.

This translation layer maps native types effectively. Python integers and floats become JavaScript numbers, booleans remain booleans, Python dictionaries convert to JavaScript objects, and lists become arrays. For types that don't have a direct equivalent, Pyodide employs proxy objects. These proxies forward attribute access and method calls across the language boundary, enabling patterns like passing a Python function as a callback to a JavaScript handler.

Implications for Developers and Startups

The ability to mix JavaScript and Python within Cloudflare Workers significantly expands the development possibilities. Developers can now choose the best language for specific tasks without sacrificing integration ease. Python's extensive libraries for data science, machine learning, and backend logic can be readily combined with JavaScript's strengths in frontend development and web APIs.

For startups, this lowers the barrier to building complex, multi-language applications on the edge. It means faster iteration cycles and the potential to leverage existing developer expertise in either language. Founders can architect systems where, for example, a Python Worker handles heavy data processing or AI inference, while a JavaScript Worker manages API routing and user authentication. This flexibility is particularly valuable in the rapidly evolving AI agent space, where combining different language runtimes for various agent functions could become a common pattern. This move aligns with Cloudflare's broader strategy to make its edge computing platform a versatile environment for modern application development.

The RPC calls behave like standard function calls, returning promises in JavaScript/TypeScript and futures in Python. Exceptions are propagated across the language boundary, and any Structured Cloneable types can be passed as parameters or return values. Crucially, RPC calls between Workers typically do not cross a network and run in the same thread, resulting in near-zero performance overhead compared to intra-worker communication.

The entire implementation is open-source, residing within workerd and the workers-runtime-sdk, which should foster community contributions and transparency.

This advancement positions Cloudflare Workers as a more competitive platform for developers who need polyglot capabilities at the edge. It simplifies distributed systems development, making it easier to build sophisticated applications that benefit from the strengths of multiple programming languages.

© 2026 StartupHub.ai. All rights reserved. You may not republish this article in full without a license. Search engines and AI research tools may crawl and summarize for reference. Bulk reproduction or model training requires a license. See our terms.
Daniel Singer

Written by

Daniel Singer

Editor, StartupHub.ai

Daniel Singer is the editor of StartupHub.ai, a technology expert and thought leader on AI and its applications across sectors, from fintech and healthcare to developer tooling and consumer software. He writes and tests the tools covered here thoroughly and regularly, and built StartupHub.ai to give founders, operators and buyers a clearer read on what they are actually being sold.