You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So far, rules_prerender makes heavy use of NodeJS to run JavaScript at build-time, however this is not a strict requirement. While most of the tooling takes advantage of NodeJS, there's no reason that needs to extend to user code. It makes just as much sense to allow users to write Rust, Java, Python, C#, or whatever other language they want to use (Haskell anyone?).
The only caveat here is that the renderer does require NodeJS, since it provides a cleaner interface to emit files at the right path with PrerenderResource. However, we could make an alternative renderer for any given language and provide a comparable API. As long as users specify in prerender_component() and/or prerender_pages() what language/framework they are using for prerendering and stay consistent within generating a single page, they can mostly use whatever they want.
We could also consider a slightly less opinionated version of prerender_pages() which allows the user to generate their own binary target but still get all the benefits of bundling. I'm not sure how much value all this gives, but I'm sure eventually someone will want to do this in Rust. It should be possible and we can track interest in this issue.
The text was updated successfully, but these errors were encountered:
So far,
rules_prerender
makes heavy use of NodeJS to run JavaScript at build-time, however this is not a strict requirement. While most of the tooling takes advantage of NodeJS, there's no reason that needs to extend to user code. It makes just as much sense to allow users to write Rust, Java, Python, C#, or whatever other language they want to use (Haskell anyone?).The only caveat here is that the renderer does require NodeJS, since it provides a cleaner interface to emit files at the right path with
PrerenderResource
. However, we could make an alternative renderer for any given language and provide a comparable API. As long as users specify inprerender_component()
and/orprerender_pages()
what language/framework they are using for prerendering and stay consistent within generating a single page, they can mostly use whatever they want.We could also consider a slightly less opinionated version of
prerender_pages()
which allows the user to generate their own binary target but still get all the benefits of bundling. I'm not sure how much value all this gives, but I'm sure eventually someone will want to do this in Rust. It should be possible and we can track interest in this issue.The text was updated successfully, but these errors were encountered: