Languages
Background
Workers is a polyglot platform. You can write Workers with a language you likely already know. Cloudflare built Workers to execute JavaScript and WebAssembly and has continuously added support for new languages.
JavaScript / TypeScript
The Workers platform fully supports JavaScript. Cloudflare recommends using JavaScript and TypeScript. Find up-to-date type definitions on GitHub and npm.
Language | Template |
---|---|
JavaScript | cloudflare/worker-template |
TypeScript | cloudflare/workers-sdk/templates/worker-typescript |
Resources on JavaScript / Typescript
- Quickstarts – More example repos to use as a basis for your projects
- TypeScript type definitions
- JavaScript and web standard APIs
- Tutorials
Wasm-supported
WebAssembly — abbreviated Wasm — is a binary format that many languages target during their compilation. This allows developers to write Workers using languages like C, C++, Rust, and more.
Resources on WebAssembly
Compiled to JavaScript
You can write Workers with any language that can compile to JavaScript, including the languages below.
Refer to the Cloudflare Workers announces broad language support blog post for more information.