Skip to content

Creating a binary executable from a Clojure script #769

Description

@BuddhiLW

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions