Creating a binary executable from a Clojure script
- Dominant language
- Clojure
- Stars
- 1.7k
- Forks
- 178
- PR merge metrics
- No merged PRs in 30d
Description
**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`,
```clj
#!/usr/bin/env boot
(defn -main [& args]
(println (str "Hello "
(reduce str (map #(str % ", ") args)))))
```
Example call,
```shell
chmod +x ./example.clj
./example.clj "Peter" "Julian" "Mary"
```
Outputs:
```shell
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
Contributor guide
Research direction
Start by reviewing how Boot handles the boot shebang and invocation of standalone .clj scripts. Determine whether producing a binary executable without a project folder is supported or requires a new packaging design; done means the example script can be invoked as a fast executable while preserving its arguments and output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100