Fork me on GitHub
#babashka
<
2023-05-28
>
borkdude09:05:57

https://github.com/babashka/babashka: Native, fast starting Clojure interpreter for scripting Monthly maintenance release! Reminder: https://babashka.org/conf/ is happening June 10th in Berlin. Only 6 tickets left! 1.3.180 (2023-05-28) • https://github.com/babashka/babashka/issues/1524: Remove dynamic builds for linux-aarch64 (https://github.com/lispyclouds) • https://github.com/babashka/babashka/issues/1557: Add support for babashka.process/exec after namespace reload of babashka.process (https://github.com/lread) • https://github.com/babashka/babashka/issues/1548: shell and sh should respect babashka.process/*defaults*https://github.com/babashka/babashka/issues/1524: deprecate (remove) linux-aarch64 dynamic binary build • Expose org.graalvm.nativeimage.ProcessProperties/exec • Bump babashka.http-client to 0.3.11 • Bump babashka.fs to 0.4.19 • Bump babashka.process to 0.5.21

🎉 14
babashka 5
rmxm18:05:24

hey, is there a recommended way to distribute my babashka application as single binary?

borkdude18:05:14

You can use caxa: https://github.com/babashka/babashka/wiki/Self-contained-executable But I don't recommend it. Just advice your friends to install bb and use bbin to install the script: https://github.com/babashka/bbin

👍 2
elken18:05:15

Curious why it's not recommended? Is there a performance impact?

borkdude18:05:08

It's just way more hassle than necessary, you have to do it for each OS + architecture

elken19:05:48

Ah that's quite sensible actually! Thanks

Karthik (కార్తీక్)17:05:35

I was about to ask this and here i saw the thread 😄

Karthik (కార్తీక్)17:05:37

> It's just way more hassle than necessary, you have to do it for each OS + architecture we could config a CI system for eg: github actions to make matrix builds & output all platform binaries, Yes, This is an extra step

borkdude17:05:06

you can iterate faster if you will just distribute the script and not bb itself, but if you like to make a binary, go ahead

🙌 2
Tomas Brejla13:06:25

Nice, I didn't know about caxa 👍 To answer this question: > Curious why it's not recommended? Is there a performance impact? I just quickly tried packing one of my recent bb scripts into caxa executable and tried to run it so that it prints out usage. Following times are on i7-12800H cpu. • bb myscript.clj 8ms startup time; bb has 73MB (as it's not compressed to have as fast startup time as possible afaik) • first run of myscript caxa binary: 800ms, binary size 25MB • succeeding runs of myscript caxa binary: ~17ms (I believe the caxa binary extracts its internal content somewhere and caches it) I'll keep using bb + the actual script "kombo", but it's nice to have this "self-containing uber-native-binary" alternative if you ever need it. 👍

👍 2