babashka 2026-06-12

FYI if you're using homebrew to install bb: https://github.com/babashka/babashka/issues/1981

👍 3

you're so fast!

babashka can use JNA?

JNA is used only in clojure when running on the JVM. In babashka its a shim to bbssh, which is a pod built with Graal. That uses C interop via the substrate VM. https://epiccastle.io/blog/uniting-c-and-clojure-in-bbssh/

Ah, ok - thanks for the explanation.

maybe you can use the Java FFM instead. This perhaps works in bb

(and if not, we could perhaps make it work, not sure if it works dynamically)

Does FFM use print that warning? I would love to get rid of the warning without needing the command line args.

define "that warning"?

but yeah I think it will

except in bb since it already has those cmd args at compile time

when you load the C lib it prints

WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by com.sun.jna.Native ...
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

its fine in babashka, no warning is printed because its going via the pod.

with Java FFM you'll still get this

but you can drop the JNA lib and perhaps it'll work in bb (if you use the dynamic binary of bb)

(I never tried FFM from source in bb, but it does have it baked in for JLine)