Environment setup

This is what you will be doing, in a nutshell:

  • installation of sbt
  • installation of LLVM and Clang
  • installation of Boehm GC

Installing sbt

Please refer to this link for instructions for your OS.

Please note that you’ll need Java 8 or more recent to use the Scala Native toolchain.

Installing LLVM, Clang and Boehm GC

Boehm GC and LLVM (that includes Clang) are Scala Native’s only external dependencies. Here are install instructions for a number of operating systems Scala Native has been used with:


$ sudo apt-get install clang libgc-dev libunwind-dev libre2-dev

Note: libre2-dev is available since Xenial (16.04 LTS). Refer to travis.yml to install from source.


$ brew install llvm bdw-gc re2


$ pkg install llvm38 boehm-gc libunwind re2


$ wget https://raw.githubusercontent.com/scala-native/scala-native/master/bin/scala-native.nix

$ nix-shell scala-native.nix -A clangEnv

Continue to Building projects with sbt.