3 ms·
JS, TS, Python, and Rust are first class options, plus generic wasm: https://developers.cloudflare.com/workers/languages/ https://developers.cloudflare.com/wor
by hamandcheese 2y ago
JS, TS, Python, and Rust are first class options, plus generic wasm:
https://developers.cloudflare.com/workers/languages/ https://developers.cloudflare.com/workers/languages/
- re-thc 2y ago> and Rust are first class options, plus generic wasm Rust is still a wasm target. Not everything easily works. It doesn’t have all the Cloudflare sdk features js/ts has either.
- kflansburg 2y agoAll of the JS features are available in Rust, but some don’t have a first-class SDK API yet and you must use wasm-bindgen.
- hamandcheese 2y agoI'm just using Cloudflare's own words.
- mi_lk 2y agoInteresting choice to support Rust over Go if you ask me. Don't have numbers but I don't really peg Rust as a popular language for serverless web apps, certainly not to the extent of Go
- watermelon0 2y agoNon-JS workers run via WASM, and Rust had WASM support before Go.
- hamandcheese 2y agoI think GCd languages are not a great fit for WASM right now (though that is quickly changing).
- pimeys 2y agoWe ran our whole platform, written in Rust, in the Cloudflare Workers. It was not a great experience. You need to use their SDK, with really interesting bugs that never got fixed (we always forked a version). It was pretty hard to test anything locally, you just had to deploy your code to their platform, which took time and made the feedback loop to take so much time it blocked us from delivering features fast enough. And yes, you can test your local Rust code. It works nicely on your machine, but breaks with a really nasty error on their platform. The target is `wasm32-unknown-unknown`, which allows you to use `fetch` as your only source of IO. Ok, their workers has a hacky socket implementation nowadays. Non-standard of course. And most of the ecosystem won't work really without forking everything and fixing the bugs by yourself. We pivoted to a native Rust project. We still have one worker running in Cloudflare. We isolated that code from the workspace so that renovate updates will not touch it. You know, a random version upgrade might break the service...