babashka/doc/build.md
Michiel Borkent 738c52189d doc
2020-04-26 13:13:51 +02:00

1.6 KiB

Building babashka

Prerequisites

  • Install lein for producing uberjars

  • Download GraalVM. Currently we use java8-19.3.1.

  • Set $GRAALVM_HOME to the GraalVM distribution directory. On macOS this can look like:

    export GRAALVM_HOME=~/Downloads/graalvm-ce-java8-19.3.1/Contents/Home
    

    On linux:

    export GRAALVM_HOME=~/Downloads/graalvm-ce-java8-19.3.1
    

    On Windows:

    set GRAALVM_HOME=C:\Users\IEUser\Downloads\graalvm-ce-java8-19.3.1
    

Clone repository

NOTE: the babashka repository contains submodules. You need to use the --recursive flag to clone these submodules along with the main repo.

$ git clone https://github.com/borkdude/babashka --recursive

To update later on:

$ git submodule update --recursive

Build

Run the compile script:

$ script/compile

To configure maximum heap size you can use:

$ BABASHKA_XMX="-J-Xmx4g" script/compile

Windows

To compile on Windows you need to check out the windows branch:

$ git checkout windows

The compile script for Windows is script/compile.bat.

Optional features

HyperSQL

To compile babashka with HyperSQL/hsqldb support, set BABASHKA_FEATURE_HSQLDB to true:

$ BABASHKA_FEATURE_HSQLDB=true script/compile

Check out this example.

If you think this feature should be enabled in the distributed version of bb, vote with a thumbs up on this issue.