What's the right way to create a library (at all) and then what is the right way to create a library that is compatible for import with both Clojure JVM and Babashka?
If you want to ensure it's compatible with babashka, I'd recommend running its tests with babashka
You can use reader conditionals #?(:bb 1 :clj 2) or use a macro like:
(def bb? (System/getProperty "babashka.version"))
(defmacro if-bb [then else] (if bb? then else))Creating a Clojure library is as simple as putting a Git(hub) repo up and adding a deps.edn
Fattest thank you possible @borkdude, all questions sated!
should probably also mention that this should be done in a .cljc file extension.
https://clojure-doc.org/articles/ecosystem/libraries_authoring/ might be good reading.
(it doesn't tackle the cross-dialect aspect, but it seems you got that answered above)