Re:Automatically generating types for Cloudflare Workers
by e12e on Thursday November 18, 2021 @04:00PM
(#29270465)
Looking at https://webidl.spec.whatwg.org/ I'm not sure if I understand how this really helps bridging type information from js to python to c++ - it looks very tied to js?
There's openapi (swagger) and json schema which seems more like helping define RPC over http?
In Cloudflare Workers we've taken a different path, having the C++ interfaces be the source of truth, as we feel this leads to less cognitive overhead for developers on the project (and avoided the need to write a new WebIDL code generator matching our internal C++ dialect). It's possible we'll revisit this decision in the future, but for the moment it seems to be working well.