Open dave-calleja opened 1 month ago
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
2. Node
```ts
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 Great work! I'm really looking forward to the Cloudflare workers support.
@yicru Works! Guess there will be three official supported runtimes. Bun, Node, and Cloudflare Worker
@schettn Great! Super excited for the release!
Thanks for the awesome work @schettn
Hi @dave-calleja @yicru.
Would you be so kind to test the beta?
Quick setup with Cloudflare Workers:
https://github.com/user-attachments/assets/9d4ce577-18e1-4088-abd2-716972d1fbdb
Note: 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!
@dave-calleja @yicru @jaemig
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 Happy that you like it!
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.
Please let me know if there is anything I should specifically test to get it out of beta :)
There are two important things:
npm run pylon dev ...
. (Does is crash sometimes? Does it block the port after crashing? How is the DX? Etc..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.
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