This document provides instructions for installing and running the ideal metaprogramming framework. For an introduction to the ideal source notation, please read quickstart. For description of the directory layout, read overview of the ideal codebase.

Step 1: Clone GitHub Repository.
Go to the GitHub project page, and follow the instructions to create a local copy of the repo.
Step 2: Install JDK.

Ideal works with JDK 8 or higher. You can download the recent JDK from the Java site.

On macOS, after you installed JDK 16, running /usr/libexec/java_home should output /Library/Java/JavaVirtualMachines/jdk-16.0.2.jdk/Contents/Home

Step 3: Download Dependencies.

Before running ideal, you need to create and populate the thirdparty directory; you can do that by running bin/setup-thirdparty.sh script from the top-level directory. The dependencies are JSR 305 annotations and JavaCUP.

In addition, you'll need to create a symlink from thirdparty/jdk to the JDK home directory. On macOS, the setup-thirdparty script should do that for you. It should be possible to invoke the Java compiler by running thirdparty/jdk/bin/javac.

To run the experimental Coach app, you'll need Google Gson and AppEngine SDK (you can skip that if you are just trying ideal out).

Step 4: Compile And Run!
Make is currently used to build and run ideal.
  • make hello — try this first!
  • make circle — run the type flavors example from this source.
  • make print_elements — bootstraps ideal.library.elements, analyzes it and prints it out. This is the default target.
  • make generate_library and make generate_runtime generate Java source code from library and runtime, respectively.
  • make test_librun tests that the library and runtime code compiles.
  • make bootstrap_library and make bootstrap_runtime bootstrap the code by overwriting the files in bootstrapped directory.
  • make document_site — generate the content of theideal.org site. The files are written to build/pretty/ and can be viewed directly from the filesystem.
  • make deploy_site — prepare the content of theideal.org for deployment. The files are written to build/theideal.org/, but the links do not work on the filesystem.

For questions and feedback, here's how to communicate.