The easiest way to get started is to follow our tutorial. You can also fork the bootstrapping skeleton and follow the instructions in its readme or try it out in the browser. There's also an e-book Hands-on Scala.js which contains a lot of introductory material to help you get started.
We also have a standalone distribution that doesn't require SBT.
Note that Scala.js is not part of the Typesafe Reactive platform. Thus, although we consider Scala.js production-ready, Typesafe does not provide any commercial support for it.
- Support all of Scala (including macros!), modulo a few semantic differences
- 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. Compiled blobs range from 170-400kb
- Documentation: APIs, guides, and reference.
- Scala.js tag on Stackoverflow: for delimited technical questions on using Scala.js.
- Official mailing list: for general discussion, ideas, announcements of your libraries, etc.
- Gitter chat room: come and meet the community of Scala.js users.
Featured presentations to get you convinced:
- Hands-on Scala.js at Pacific North-West Scala 2014, by Li Haoyi
- Cross-Platform Development in Scala.js at Scala by the Bay 2014, by Li Haoyi
This is a collection of libraries known to work with Scala.js.
Some of them, like
Some others, such as
scala-async, are pure-macro projects, and thus work with Scala.js out of the box.
Most of them, though, are cross-compiling over JVM and JS, and thus have separate artifacts to run on each platform.
- scalajs-dom: static types for the DOM API, plus a few extensions
- scalajs-jquery: static types for jQuery
- scalajs-puchdb: static types for PouchDB
All these testing frameworks cross-compile on the JVM and JS.
- Little Spec
- Nyaya: Property testing and related.
- zcheck: A wrapper around scalacheck and scalaz's Speclite.
HTML templating libraries
- Scalatags: cross-compiling HTML templating library/DSL that works on both Scala/JVM and Scala.js
- scalajs-react: Type-safe and Scala-friendly library over Facebook's React.
- scala-js-binding: An all-Scala.js HTML binding library
- scalajs-angular with TodoMvc example: static types and complementary API for AngularJS
- scalajs-angulate: another binding to AngularJS with enhancements
- uPickle: cross-compiling statically-typed pickling (via typeclasses/macros) for both Scala/JVM and Scala.js
- Prickle: cross-compiling statically-typed pickling library with support for pickling object graphs containing shared objects and cycles
- Scala.js Pickling: cross-compiling pickling library based on explicit registration of picklers
- autowire: cross-compiling statically-typed Ajax calls and RPCs
- Scala.Rx: cross-compiling change-propagation/FRP library
- Monifu: cross-compiling reactive extensions (Rx) with back-pressure, atomic references and other multi-threading primitives
Ports of well-known Scala libraries
- NICTA/rng: Pure-functional random value generation.
- Monocle: Optics library strongly inspired by Haskell Lens.
- Scalaz: Library for functional programming.
- Shapeless: Generic programming for Scala.
- Scala-Async (works out-of-box with Scala.js)
- Scalaxy Loops and Streams (work out-of-box with Scala.js)
- workbench-example-app: skeleton application using Scala.js workbench for live-reloading in the browser, together with a collection of sample applications developed using it
- Play! application with Scala.js
- Node.js module with Scala.js
- SPA tutorial with Scala.js and React: Simple Single Page Application tutorial built upon scalajs-react, Spray and Bootstrap.
- Scala.js workbench: sbt plugin for Scala.js projects for live-reloading in the browser (example app)
List of websites using Scala.js:
- January 2015
- September 2014
- July 2014
- Play and Scala.js Showcase, by Hussachai Puripunpinyo
- May 2014
- Papa-Carlo Incremental Parser Demo, by Eliah-Lakhin
- April 2014
- Ray-Tracer, a ray-tracer written in Scala.js by Li Haoyi
- February 2014
- TodoMVC, an implementation of the TodoMVC example application using Scala.js, Scalatags, Scala.Rx and scala-js-dom, by Li Haoyi
- Sierpinski Triangle and Dodge the dot (Scala.js workbench example apps), by Li Haoyi
- Scala.jsFiddle, an online scratchpad that lets you compile and run Scala.js snippets right in the browser, by Li Haoyi
- December 2013
- Roll, a 2D Physics Platformer by Li Haoyi
- December 2013
- October 2013
- Several games by Li Haoyi
- July 2013
- Knapsack on a graph by Krishnan Raman
- June 2013
- April 2013
- The Reversi example by Sébastien Doeraene
Hall of Fame
- Bug in node.js/v8 discovered by Scala.js through Scala test suite