Babashka becomes incredbly useful.
with the web server.
I was using clojurescript for cheap memoy servers, but with babashka, I guess we have a new contender.
Is reitit also compatible with babashka?
Not yet. This repo has done some work on that: https://github.com/kloimhardt/bb-web
I haven't tried running reitit from source with bb, but I expect there will be some issue
I think if we include reitit, also ring-defaults has to be included since it depends on that I think?
reitit.core
depends only on meta-merge
, reitit-ring
depends reitit-core
and ring
.
… but then there is reitit-swagger
, reitit-spec
, reitit.middleware
… modules which depend on half the planet 🙂
Ah I see, good to know
Writing an ad-hoc router for a specific small ring app isn't that hard though. Can get a lot of leverage just from case and re-matches probably :)
But feel free to open an issue @neo2551 about reitit and we'll see what the rest of the community thinks
Also please leave some notes at https://github.com/borkdude/babashka/issues/556 how you are using the server, if you are going to.
If I would like to have the full-reitit with bb, can I do a pod out of those (if they compile with GraalVM)?
yeah, pod can work for now I think, since routing is just data in data out right?
eventually a built-in router would be better, but I'm awaiting more feedback for proceeding into the web apps path with bb
just data when defining things, translated into optimized java on the JVM. There are few optional optimizations that do code generation, which won’t work, but mainly just for beating the benchmarks and not enabled by default.
a pod would be nice meanwhile. I'm pretty sure reitit compiles with GraalVM, given https://github.com/kloimhardt/bb-web
oh, that’s the same thing, my bad.
no it's not. bb-web is using a fork of babashka with reitit and ring-defaults included, yogthos' repo is only using GraalVM, no interpreter
Sophisticated CI script using babashka and clj-kondo in Gitlab: https://gist.github.com/hansbugge/4be701d771057e8ef6bbbb0912656355
Pondering about an idea to leverage clojure git libs for (GraalVM or other) binaries: https://github.com/babashka/babashka.pods/issues/19