July 18, 2013



Decaf video

Decaf is a platform built on the Rhino JavaScript runtime.

Rhino is an open source JavaScript engine, developed entirely in Java, and managed by the Mozilla Foundation. It runs on runtimes for Java 6, Java 7, and Java 8. Under the hood, your JavaScript is compiled to Java byte codes and run within the JVM. The JVM then optimizes the byte codes using its JIT technology.

Rhino has been worked on since the 1990s, is stable, has a built-in debugger with GUI, has built-in capability to interface to the entire Java ecosphere from JavaScript, and since it runs on the JVM you get native Threads for your JavaScript.

Decaf is also fully portable to any platform that has at least a Java 6 implementation.

Decaf’s API is fully synchronous - you write structured and procedural programs like you do in most any traditional programming language. You can implement evented applications, but it is not required.

One of the goals of Decaf is to write everything in JavaScript. Decaf itself is a shell script that launches your JavaScript application in the Rhino environment extended with the core Decaf API. Decaf does include two .jar files: Rhino and JLine; JLine is used by the REPL mode to provide command line history.


DecafJS is MIT licensed.