GETTING STARTED

PREREQUISITES

First, make sure to download and install the following prerequisites:

While it’s not at all required, it may be easier to learn to use Spatial if you’ve had experience with Scala or a similar functional programming language in the past. Knowledge of Scala will allow you to use meta-programming to assist your Spatial designs.

If you’d like, check out this Scala tutorial .

Finally, please sign up for the Spatial users google group if you have any questions.

Quick INSTALLATION (recommended)

Run the following (bash) commands to clone the spatial-quickstart repository:

$ git clone https://github.com/stanford-ppl/spatial-quickstart

This will clone the spatial-quickstart, which is a repo that contains a build.sbt configured to fetch the latest spatial packages from the Nexus Repository and a small amount of source code. To get started, run

$ cd spatial-quickstart
$ make install

Note, you may need to export your JAVA_HOME environment variable to point to your Java installation (usually /usr/bin)

When you run “make install,” it will create an executable named “emptiness” in your $HOME/bin directory and add this to your PATH. It would be useful to add this directory to your path permanently (in ~/.bashrc or likewise) so it is always visible.

You are now ready to start writing apps directly in spatial-quickstart/src/main/scala!

Installation from Source

Run the following (bash) commands to clone the spatial repository:

This will clone the latest spatial version, which contains the entire Spatial compiler, including argon, forge, emul, and other packages, as well as a large amount of test apps. You are now ready to compile the language. Run the following:

$ cd spatial

$ make install

Note, you may need to export your JAVA_HOME environment variable to point to your Java installation (usually /usr/bin)

When you run “make install,” it will create an executable named “emptiness” in your $HOME/bin directory and add this to your PATH. It would be useful to add this directory to your path permanently (in ~/.bashrc or likewise) so it is always visible.

You are now ready to write apps directly in spatial/apps/src!