This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-29
Channels
- # announcements (44)
- # architecture (12)
- # babashka (45)
- # beginners (56)
- # calva (16)
- # cider (34)
- # clj-kondo (6)
- # clojure (47)
- # clojure-austin (2)
- # clojure-brasil (3)
- # clojure-europe (39)
- # clojure-germany (2)
- # clojure-nl (1)
- # clojure-norway (39)
- # clojurescript (7)
- # cursive (1)
- # datahike (2)
- # datomic (28)
- # emacs (8)
- # gratitude (3)
- # humbleui (4)
- # hyperfiddle (45)
- # kaocha (1)
- # lsp (94)
- # nbb (2)
- # off-topic (29)
- # practicalli (8)
- # releases (2)
- # shadow-cljs (6)
- # squint (17)
- # tools-deps (12)
- # vim (11)
On this page https://practical.li/clojure/clojure-cli/projects/tools-build/ , in the box titled "Java ARchive - jar file" is the sentence fragment "... and can contain Clojure sources or compiled class files from the project (or both)". I've been searching for a couple of hours now, and I can't find any instructions, sample projects, tutorials, or guides that show how to setup a project that uses tools-build/tools-deps to create a project that yields an uberjar with no source code and AoT compiled. I'm trying to create the smallest, fastest loading, .jar file I can for an IoT project. Any pointers would be greatly apperciated!
The tools.build guide has an aot compiled uberjar example - you would just need to remove the one line that copies source to skip that
That’s the call to b/copy-dir in that example
I would also recommend setting the compile-clj compiler settings to use direct linking and elide meta if you’re looking for fastest and smallest, see https://clojure.github.io/tools.build/clojure.tools.build.api.html#var-compile-clj
More explanation at https://clojure.org/reference/compilation if needed