Build Status

Scala.js compiles Scala code to JavaScript, allowing you to write your Web application entirely in Scala!

Important notice! Scala.js is still experimental! Although this is a project of LAMP/EPFL for which we will continue to provide best-effort improvements and bug fixes, it is not supported by Typesafe, and not part of any of their support contracts. You have been warned!

Noteworthy features:

  • Support all of Scala (including macros!), modulo a few semantic differences
  • Very good interoperability with JavaScript code. For example, use jQuery and HTML5 from your Scala.js code, either in a typed or untyped way. Or create Scala.js objects and call their methods from JavaScript.
  • Integrated with sbt (including support for dependency management and incremental compilation)
  • Can be used with your favorite IDE for Scala
  • Generates Source Maps for a smooth debugging experience (step through your Scala code from within your browser supporting source maps)
  • Integrates Google Closure Compiler for producing minimal code for production.

Get started

The easiest way to get started is to fork the bootstrapping skeleton and follow the instructions in its readme. You can also try it out in the browser.



Useful links


  • Static types for the DOM API, by Li Haoyi
  • Static types for jQuery, brought to you by Sébastien Doeraene
  • Scalatags, a HTML templating library/DSL that works on both Scala-JVM and Scala-JS, by Li Haoyi
  • Scala.Rx, a change-propagation/FRP library that runs on both Scala-JVM and Scala-JS, by Li Haoyi
  • uTest, a tiny, portable unit testing library that lets you run the same tests on both Scala-JVM and Scala-JS, by Li Haoyi
  • Scala.js Pickling, a cross-compiling pickling (aka serialization) library for Scala.js and Scala with a common JSON-based format, by Sébastien Doeraene



  • Scala.js workbench, an sbt plugin for Scala.js projects for live-reloading in the browser (example app), by Li Haoyi
  • Scala.js Resource, an sbt plugin for bundling of binary files so they can be accessed from the browser, by Li Haoyi



Want to contribute to Scala.js? Check out the list of contributing opportunities.

Built with Scala.js

Beginning a list of websites using Scala.js:

Fork me on GitHub