{
  "id": 5620229,
  "title": "Babashka 1.13.220 gets FFI",
  "url": "https://urgent.news/2026/09/04/babashka-1-13-220-gets-ffi",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-04T18:33:44.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://blog.michielborkent.nl/babashka-ffi.html"
  },
  "original_language": "en",
  "account": "Babashka 1.13.220, the latest release, introduces a new feature called babashka.ffi, enabling direct calls to C libraries from Babashka scripts. This functionality is also available as a standalone library for JVM Clojure projects. The API is currently experimental, but feedback is encouraged. The release includes a demo showcasing how to load libraries like libz from the system and perform mathematical operations. The API decisions in babashka.ffi are inspired by coffi, but it differs in several ways. Users can supply an explicit library to defcfn, and it features a place concept that allows efficient reading and writing to structs and unions. Babashka.ffi builds on java.lang.foreign and requires explicit memory management via arenas. This release changes the default binary type for Babashka on Linux to mostly-static, with the exception of the glibc shared library. The aarch64 binary remains dynamically linked. A statically linked binary can be obtained using the installer script with the --static flag. The release also brings improvements to task handling, including :exec-fn tasks composing through :depends and the ability to provide :exec-args directly on a task. Additionally, a :cmd tree can now be provided through a var, with the namespace loaded on demand. The development of FFI and validation through examples and libraries involved the assistance of Large Language Models.",
  "summary": null,
  "key_points": [
    "Babashka 1.13.220 introduces babashka.ffi for C library calls from scripts",
    "API experimental but feedback encouraged from developers",
    "Demo shows loading libraries and performing mathematical operations"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}