boot
boot copied to clipboard
Creating a binary executable from a Clojure script
Question Can I compile a clojure script, with the boot shebang, and use the binary executable instead of running the start boilerplate evertime?
To Reproduce
create a file example.clj
,
#!/usr/bin/env boot
(defn -main [& args]
(println (str "Hello "
(reduce str (map #(str % ", ") args)))))
Example call,
chmod +x ./example.clj
./example.clj "Peter" "Julian" "Mary"
Outputs:
Hello Peter, Julian, Mary,
Expected behavior Get an executable that doesn't take 5 seconds to do the same output,
- with Clojure.
- without a project folder structure.
Desktop (please complete the following information):
- OS: Artix Linux