Pods support for JVM and babashka
Find a file
2020-05-17 15:25:04 +02:00
script use clojure instead of clj in test script 2020-05-09 14:19:22 +02:00
src/babashka Support code in var section 2020-05-17 15:25:04 +02:00
test/babashka/pods Support code in var section 2020-05-17 15:25:04 +02:00
test-pod/pod Support code in var section 2020-05-17 15:25:04 +02:00
.gitignore init 2020-05-09 12:12:42 +02:00
deps.edn Support code in var section 2020-05-17 15:25:04 +02:00
LICENSE Tests, etc 2020-05-09 14:03:50 +02:00
README.md Unmap var before interning 2020-05-09 16:12:43 +02:00

babashka.pods

A library to load babashka pods. Used by babashka but also usable from the JVM or other sci-based projects.

More information about babashka pods can be found here.

Usage

Using pod-babashka-hsqldb as an example pod.

On the JVM:

(require '[babashka.pods :as pods])
(pods/load-pod "pod-babashka-hsqldb")
(require '[pod.babashka.hsqldb :as sql])

(def db "jdbc:hsqldb:mem:testdb;sql.syntax_mys=true")
(sql/execute! db ["create table foo ( foo int );"])
;;=> [#:next.jdbc{:update-count 0}]

From the Small Clojure Interpreter:

See test/babashka/pods/sci_test.clj.

Why JVM support?

  • Babashka pods allow you to leverage functionality from other programs regardless of the technology they were implemented in. As such, pods can be a light weight replacement for native interop (JNI, JNA, etc.).

  • When developing pods, this library can be used to test them on the JVM.

Run tests

$ script/test

License

Copyright © 2020 Michiel Borkent

Distributed under the EPL License. See LICENSE.