Dotty Documentation


Getting Started: Users

Edit this page on GitHub

Trying out Dotty

In your web browser

Scastie, the online Scala playground, supports Dotty. This is an easy way to try Dotty without installing anything, directly in your browser.


The fastest way to create a new project compiled by Dotty is using sbt (0.13.13+)

Create a simple Dotty project:

$ sbt new lampepfl/dotty.g8

Or a Dotty project that cross compiles with Scala 2:

$ sbt new lampepfl/dotty-cross.g8

You can then start a Dotty REPL directly from your sbt project:

$ sbt
> console

For more information, see the Dotty Example Project

IDE support

Start using the Dotty IDE in any Dotty project by following the IDE guide.

Standalone installation

Releases are available for download on the Releases Section of the Dotty repository. Releases include three executables: dotc the Dotty compiler, dotd the Dotty Documentation tool and dotr the Dotty REPL.

└── bin
    ├── dotc
    ├── dotd
    └── dotr

Add these executables to your PATH and you will be able to run the corresponding commands directly from your console:

# Compile code using Dotty
$ dotc HelloWorld.scala

# Run it with the proper classpath
$ dotr HelloWorld

# Start a Dotty REPL
$ dotr
Starting dotty REPL...

If you're a Mac user, we also provide a homebrew package that can be installed by running:

brew install lampepfl/brew/dotty

In case you have already installed Dotty via brew, you should instead update it:

brew upgrade dotty