Downloading Shadow

The Shadow 0.8 compiler has distributions for Linux, macOS, and Windows as well as plug-ins for different editors and IDEs. Look below for more information about the downloads you’re interested in.

The Shadow compiler is written in Java, so you must have Java 8 or higher to use Shadow, no matter your operating system. The compiler distributed as a JAR file with directories containing the standard Shadow libraries, written in Shadow with a few LLVM and C source files for lower level functionality.

The Clang compiler and other LLVM tools are also required to compile Shadow code, but those installations are more OS-specific.

Linux

Ubuntu 18.04 and higher is supported, but other distributions and releases of Linux can run Shadow. The chief hurdle to overcome is installing LLVM 6.0 or higher binaries, which are not available from all package managers.

Installation

Click the button below for the 0.8 Linux distribution of the compiler.

Once you’ve downloaded and extracted the files inside, running the install.sh script with root privileges will use apt, dnf, or pacman to install clang and LLVM 6.0 or higher, add links to shadowc and shadox into /usr/local/bin/, and add the environment variable SHADOW_HOME to your login script. Then, you can run shadowc from any terminal. Note: Installing LLVM make take a little while.

It’s not absolutely necessary to use a package manager to install LLVM. You can also download Clang and LLVM and compile them yourself, if you prefer. You must build LLVM 6.0 or higher for Shadow 0.8 to work. Once you’ve built LLVM, you can run the following script (with root privileges) instead of the one included in the tar.gz file to create the appropriate Java links to run shadowc and shadox.

#!/bin/bash
SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
COMPILER="/usr/local/bin/shadowc"
echo "java -jar \"$SCRIPT_PATH/shadow.jar\"" '"$@"' > $COMPILER
chmod 0755 $COMPILER
DOCUMENTATION="/usr/local/bin/shadox"
echo "java -cp \"$SCRIPT_PATH/shadow.jar\" shadow.doctool.DocumentationTool" '"$@"' > $DOCUMENTATION
chmod 0755 $DOCUMENTATION
echo "export SHADOW_HOME=\"$SCRIPT_PATH\"" >> ~/.bashrc
source ~/.bashrc

Older Versions

Since Shadow is still in beta, these old versions are not supported in any way. They have more bugs and are harder to install. They might require earlier versions of LLVM that are harder to get a hold of.

macOS

The biggest difficulty with the macOS installation is that some of the LLVM tools we need are not available as pre-compiled binaries. Further complicating the matter is that a version of LLVM is already included with many recent versions of macOS. For now, we suggest using Homebrew to get the correct versions of the needed LLVM tools. Warning: Using Homebrew to install the required LLVM tools will likely mean that two different versions of LLVM will be installed on your computer, which could have unpredictable results.

Before you can download and run Shadow, you must install Homebrew.

Installation

Click the button below for the 0.8 macOS distribution of the compiler.

Once you’ve downloaded and extracted the files inside, running the install.sh script will use Homebrew to install LLVM 6.0 or higher, add links to shadowc and shadox into /usr/local/bin/, and add the environment variable SHADOW_HOME to your login script. Then, you can run shadowc from any terminal. Note: Installing LLVM make take a little while.

It’s not absolutely necessary to use Homebrew to install LLVM. You can also download Clang and LLVM and compile them yourself, if you prefer. You must build LLVM 6.0 or higher for Shadow 0.8 to work. Once you’ve built LLVM, you can run the following script (with root privileges) instead of the one included in the zip file to create the appropriate Java links to run shadowc and shadox.

#!/bin/bash
SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
COMPILER="/usr/local/bin/shadowc"
echo "java -jar \"$SCRIPT_PATH/shadow.jar\"" '"$@"' > $COMPILER
chmod 0755 $COMPILER
DOCUMENTATION="/usr/local/bin/shadox"
echo "java -cp \"$SCRIPT_PATH/shadow.jar\" shadow.doctool.DocumentationTool" '"$@"' > $DOCUMENTATION
chmod 0755 $DOCUMENTATION
echo "export SHADOW_HOME=\"$SCRIPT_PATH\"" >> ~/.bash_profile
source ~/.bash_profile

Older Versions

Since Shadow is still in beta, these old versions are not supported in any way. They have more bugs and are harder to install. They might require earlier versions of LLVM that are harder to get a hold of.

Windows

There will one day be a slick Shadow installer for Windows, but it’s just a zip file now. One difficulty with Windows is that some of the LLVM tools we need are not available as pre-compiled binaries. Another problem is that LLVM needs an external linker. We solve these problems by providing LLVM binaries for you and using Clang as a linker.

  • Before you can download and run Shadow, you must install Clang. After installation, you may need to add the directory holding clang.exe (likely something like C:\Program Files\LLVM\bin) to your path.
  • Then, you must install the Microsoft C++ Build Tools so that you can link Windows libraries. When you run this installer, you need to select the C++ build tools as well as the optional MSVC VS 2019 C++ x64/x86 build tools and the optional Windows 10 SDK. It might not be necessary to install these tools if you have already installed Visual Studio.

Installation

Click the button below for the 0.8 Windows distribution of the compiler.

Once you’ve downloaded and extracted the files inside, running the install.bat script will add the install directory to the user path. Then, you can run shadowc.exe and shadox.exe from the command line.

If you’re the kind of Windows user who wants to build your own LLVM binaries, this page has information about how to build LLVM using Visual Studio. Build LLVM on your machine and add the binaries to your path. Then, you can install Shadow using the instructions above and delete the LLVM executables included with the zip file, since your files will be a later version.

Older Versions

Since Shadow is still in beta, these old versions are not supported in any way. They have more bugs and are harder to install. Note that they also require MinGW to work.

Plug-ins

This page provides downloads for plug-ins, syntax highlighters, and other tools that might be helpful for developing software in Shadow. We hope to add tools for many more platforms in the future.

Eclipse Plug-in

We provide an Eclipse plug-in for Shadow development with many useful features:

  • Syntax highlighting
  • Parsing and type-checking errors and warnings reported as you type
  • Compiling and launching Shadow programs from the IDE, with redirected console I/O
  • Outline view for easy code navigation
  • Comment/uncomment code and documentation comment generation
  • Automatic code indentation

To install the plug-in, click on the Help -> Install New Software… menu. Once there, click the Add… button to add an update site. Provide whatever name you like and enter the following location: http://www.shadow-language.org/updates

If you have an older Shadow plugin, please uninstall it from Eclipse first.

Emacs Syntax Highlighter

Emacs needs no introduction. Below is an Emacs Lisp file that defines a Shadow major mode for Emacs with simple syntax highlighting.

Notepad++ Syntax Highlighter

Notepad++ is a popular, free text editor for Windows. Below is an XML file that defines syntax highlighting for Shadow inside of Nodepad++.

To install the syntax highlighter, click on Define your language… under the Language menu in Notepad++. In the dialog that opens, click on the Import… button and select the shadow-notepad.xml file you have just downloaded from the link above.

Vim Syntax Highlighter

Like Emacs, vim needs no introduction. Below is a vim syntax file and a vim file-type detect file that allow syntax highlighting for Shadow in vim.

To install the syntax highlighter, store the syntax file into ~/.vim/syntax/ and store the file-type detect file into ~/.vim/ftdetect/.