babashka

borkdude 2026-06-12T10:57:36.383469Z

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

👍 3
Crispin 2026-06-12T14:50:13.067249Z

you're so fast!

2026-06-12T15:19:44.292979Z

babashka can use JNA?

Crispin 2026-06-12T15:47:33.792019Z

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/

2026-06-12T15:48:12.811749Z

Ah, ok - thanks for the explanation.

borkdude 2026-06-12T15:48:17.644419Z

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

borkdude 2026-06-12T15:48:34.605209Z

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

Crispin 2026-06-12T15:49:13.616559Z

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

borkdude 2026-06-12T15:49:46.927489Z

define "that warning"?

borkdude 2026-06-12T15:49:55.511269Z

but yeah I think it will

borkdude 2026-06-12T15:50:11.181009Z

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

Crispin 2026-06-12T15:50:56.706439Z

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

Crispin 2026-06-12T15:51:18.003299Z

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

borkdude 2026-06-12T15:54:58.255469Z

yeah

borkdude 2026-06-12T15:55:07.447579Z

with Java FFM you'll still get this

borkdude 2026-06-12T15:55:18.504139Z

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

borkdude 2026-06-12T15:55:49.462219Z

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