-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide support for various runtimes beyond Bun, including Cloudflare Workers #6
Comments
Hello. This is a really good concern. I agree that support for various runtimes is crucial. I will start working on supporting this Runtimes. I will make this a high priority. Please be please be patient. In the meantime you could use bun to get started with developing, and switch to your required runtime later. |
Sounds great thanks :) |
Hi @dave-calleja, @yicru and @briandiephuis! Pylon 2.0 will be released in the the following days. I have updated some core components of Pylon to support the Hono Runtimes. In the beginning Bun and NodeJS will be officially supported. In theory it should also work with all the other runtimes, but there could be complications due to some still unknown side effects (for example the limited feature set of Cloudflare workers). Right after I will start working on the Cloudflare workers support. Once it's released I will provide a migration guide for you! Quick preview:
import {app} from '@getcronit/pylon'
export const graphql = {
Query: {
hello: () => {
return 'Hello, world!'
}
},
Mutation: {}
}
export default app
import {app} from '@getcronit/pylon'
import {serve} from '@hono/node-server'
export const graphql = {
Query: {
hello: () => {
return 'Hello, world!'
}
},
Mutation: {}
}
serve(app, info => {
console.log(`Server running at ${info.port}`)
}) |
@schettn |
@yicru Works! Guess there will be three official supported runtimes. Bun, Node, and Cloudflare Worker |
@schettn |
Thanks for the awesome work @schettn |
Hi @dave-calleja @yicru. Would you be so kind to test the beta?
Quick setup with Cloudflare Workers: screen-recording-2024-09-06-at-133920_l7VfjFiZ.mp4Note: The beta docs in WIP, some videos are still missing. |
Looks great so far @schettn ! Will get digging deeper some time next week but once again thanks for the great work! |
I just updated the docs links above. I forgot the Vercel share parameter. Requesting access is no longer required. Sorry I missed that!
|
@schettn works like a charm! This is truly a game changer when it comes to working with graphql. Are there any known performance issues or restrictions with not using bun? So far I have not noticed any. Please let me know if there is anything I should specifically test to get it out of beta :) |
@dave-calleja There are no real performance issues when comparing it to other frameworks like express (Node.JS), but you can of course benefit when using Bun. You should be better off by using NodeJS most of the time tbh, especially when you do not care about the performance that much. This is because some edge cases do not work with Bun yet. Take a look at Bun's priorities. But given the fact that you want to use it with Cloudflare Workers anyway, it doesn't really matter. |
There are two important things:
All in all I have already tested Pylon V2 excessively and also migrated some of my core services from V1 to V2. So I am comfortable releasing it soon. |
@dave-calleja Would you mind sharing you Pylon project with me (if you can)? I would love to see how users build there applications, so I can make Pylon better. Sadly most users are closed-source. |
@schettn Unfortunately the project is private also, but can make public a sanitised version for you benefit. |
🎉 This issue has been resolved in version @getcronit/pylon-telemetry-v1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version create-pylon-v1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version @getcronit/pylon-builder-v2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version @getcronit/pylon-dev-v1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version @getcronit/pylon-v2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I would appreciate that if you have some time for it in the future :) |
The requirement for using Bun is a limitation as it can't be run on cloudflare workers or the like. Are there any plans to support any other runtimes? I am really eager to use this in my project however introducing Bun will add needless complexity to our architecture.
Thanks
The text was updated successfully, but these errors were encountered: