Skip to content
Cloudflare

Automatically generating types for Cloudflare Workers

Nov 16, 2021Brendan Coll, Jonathan Kuperman4 min read
Opens blog.cloudflare.com
What the post coversAI, from the source post

This post details the automation of type generation for Cloudflare Workers, specifically for Rust and TypeScript.

  • An internship project developed a pipeline that runs during Workers runtime builds to generate accurate and up-to-date types.
  • This pipeline creates TypeScript and Rust types, as well as an intermediate JSON representation, ensuring consistency and enabling other language ecosystems to generate their own types.
  • Overrides are used for concepts like generics and function overloads not directly supported by the C++ runtime.
Read the full post on blog.cloudflare.com · 4 min (opens in a new tab)

More from the Edge Computing with Cloudflare Workers trail