cljtree-graalvm icon indicating copy to clipboard operation
cljtree-graalvm copied to clipboard

Tree version in Clojure built with GraalVM

cljtree-graalvm

A Clojure version of tree built with GraalVM.

Credits

This repo is inspired by:

  • https://gitlab.com/konrad.mrozek/cljfmt-graalvm
  • https://github.com/lambdaisland/birch

Usage

Usage

Options

  • --color or -c: colorize output
  • --edn or -E: output EDN

The path argument is optional and will default to the current directory.

Build

  • Install lein
  • Download GraalVM for your machine. You will need the EE version if you're using MacOS.
  • Set JAVA_HOME to the GraalVM home directory, e.g.
export JAVA_HOME=~/Downloads/graalvm-1.0.0-rc1/Contents/Home
  • Set the PATH to use GraalVM's binaries, e.g.
export PATH=$PATH:~/Downloads/graalvm-1.0.0-rc1/Contents/Home/bin
  • Create the uberjar:
lein uberjar
  • Finally, create the binary:
native-image -jar target/cljtree-graalvm-0.1.0-SNAPSHOT-standalone.jar -H:Name="cljtree" -H:+ReportUnsupportedElementsAtRuntime