4 ms·
Anyone from Cloudflare here? Are there any plans for dotnet and/or deno support? I have asked this in Discord but I haven't received any answers.
by mcraiha 6y ago
Anyone from Cloudflare here? Are there any plans for dotnet and/or deno support? I have asked this in Discord but I haven't received any answers.
- fastball 6y agoInterested to know how you are building static sites with dotnet.
- mcraiha 6y agoThere are e.g. wyam and Statiq. Then there is Blazor.
- kentonv 6y agoHi, I'm the tech lead for Workers. (I assume your question is about Workers and not Pages.) Unfortunately, we can't just take the dotnet CLR or deno off the shelf and deploy them the way we've deployed Workers. To make edge computing possible (with good performance and accessible pricing), it's necessary to be able to host tens of thousands of workers on one machine. That means we can't put each worker in its own container. We need something much lighter-weight. So, we built a custom runtime based on V8 isolates. That means we can only run programs built on JavaScript and Wasm, and written against the specific platform API we provide. (It's true that node and deno are also based on V8, but we use V8 in a very different way in order to achieve our scalability and security goals.) More on how our tech works, and the trade-offs involved: https://www.infoq.com/presentations/cloudflare-v8/ https://www.infoq.com/presentations/cloudflare-v8/ In order to support other languages, we basically have two options: * Find a way to compile/transpile them to Wasm or JavaScript that works in our runtime. This works better than you'd expect but it definitely has limitations. See: https://blog.cloudflare.com/cloudflare-workers-announces-broad-language-support/ https://blog.cloudflare.com/cloudflare-workers-announces-bro... * Offer a general container hosting service, as an alternative to Workers. There would have to be some down side here in terms of performance or cost, so we'd still recommend using Workers whenever possible. But we could do this...
- mcraiha 6y agoNo, my question is about pages. I want to my publish my deno project as static page. And I want to publish my Blazor project as static page.
- kentonv 6y agoOh... so you're talking about build-time dependencies?
- nilslice 6y agoYou can execute a bash script as your Build Command, e.g. "./pages-build.sh" which would need to be included in your repo. Within this script, you can install dependencies for an Ubuntu-based system. Here's a great example someone wrote up for Blazor (wasm) on Pages specifically: https://swimburger.net/blog/dotnet/how-to-deploy-blazor-webassembly-to-cloudflare-pages https://swimburger.net/blog/dotnet/how-to-deploy-blazor-weba...
- clarkevans 6y agoTranspile really won't work for data intensive applications. Also, for Julia, new permutations of inputs can lead to a newly compiled code.. but, once compiled, that code path is fast. Regardless, I'm hopeful for CloudFlare containers so I could run Julia.