Open trusktr opened 6 months ago
From my experience it's definitely worth the effort. I experimented with this a lot and you more or less have several options:
I'm currently integrating it in a Laravel/PHP project and it feels like something IN the project, just a nice, predicatable package. There are definitely caveats and I had to think about caching "enhancements" etc. – but having a sharable, versionable bundle which works exactly the same in every project and doesn't depend on a Node runtime/server/microservice is marvelous.
I'm currently writing up my experience in my private project and will add the link as soon as it's published. :)
I'm wondering if it is worth using Extism (which uses QuickJS), as V8 in the benchmarks is faster. Maybe it is better to just call Node/Deno/Bun from any language, for the SSR purpose? What are your thoughts?
That could be an option for some use cases, and if it works for you definitely try it. But calling out to a node process from Ruby for instance is something many users have told us they don't want to do. We are exploring lots of options. Even including rewriting the core SSR logic in the target language if there is enough demand. For instance, we have discussed rewriting Enhance SSR directly in PHP to make it easier to support Wordpress Plugins etc.
I'm wondering if it is worth using Extism (which uses QuickJS), as V8 in the benchmarks is faster. Maybe it is better to just call Node/Deno/Bun from any language, for the SSR purpose? What are your thoughts?