Skip to main content

Create a new Rascal project


Rascal projects, generally, work the same in all three IDE contexts:

  • Eclipse
  • VScode
  • Commandline

To create an empty project to get started, follow these instructions:

rascal>import util::Reflective;
rascal>newRascalProject(|tmp:///myProjectName|, name="myProjectName")

The Eclipse plugin has a "New Project Wizard" you can use as well.

The next step is to import the new project into VScode or Eclipse, or to cd to the project's root directory. From there on running rascal with the new project's source and library settings is trivial.

Rascal Project Layout

Let's describe the anatomy of what is generated by new rascal project, in case you need to reproduce it manually for some reason.

rascal>import util::FileSystem;

there are these files in the newly create project

rascal>[ l | /file(l) := crawl(|tmp:///myProjectName|) ]
list[loc]: [

The pom.xml file is the basic setup that names the project and defines its dependencies. It defines:

  • project name (artifactId and groupId)
  • project version
  • where to find Rascal library packages (repositories)
  • where to find Rascal maven plugins (pluginRepositories)
  • a list of dependencies (by default only Rascal, but find more packages
  • minimal configurations for the required maven plugins (Java and Rascal)
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""







Next to that RASCAL.MF is required to configure the development environment for the project. Some information from the pom.xml is repeated here, because this file is common between Eclipse, VScode and empty commandline projects, and such projects could work with a pom.xml:

Manifest-Version: 0.0.1
Project-Name: myProjectName
Source: src/main/rascal

And finally in src/main/rascal you'll find the Rascal source files, as configured in RASCAL.MF. In this case it's only Main.rsc:

module Main

import IO;

int main(int testArgument=0) {
println("argument: <testArgument>");
return testArgument;