Technology moves fast! ⚡ Don't get left behind.🚶 Subscribe to our mailing list to keep up with latest and greatest in open source projects! 🏆


Subscribe to our mailing list

js-engine

A JavaScript Engine Library - provides an abstract of a means to execute JavaScript code where no browser is involved.

Subscribe to updates I use js-engine


Statistics on js-engine

Number of watchers on Github 68
Number of open issues 6
Average time to close an issue 25 days
Main language Scala
Average time to merge a PR 2 days
Open pull requests 3+
Closed pull requests 3+
Last commit almost 2 years ago
Repo Created over 5 years ago
Repo Last Updated over 1 year ago
Size 222 KB
Organization / Authortypesafehub
Contributors7
Page Updated
Do you use js-engine? Leave a review!
View open issues (6)
View js-engine activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating js-engine for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

JavaScript Engine

Build Status

The JavaScript Engine library (jse) provides an Actor based abstraction so that JavaScript code can be executed in a browser-less fashion. In-jvm support is provided in the form of Trireme, a Node API for Rhino. Standalone Rhino is also supported with a RhinoShell environment. Native JavaScript performance is provided by using Common Node, node.js and PhantomJS (these latter 3 are required to be installed separately).

While multiple engines are provided, plugin authors are encouraged to target the Node API. Doing so means that the engine options generally come down to Trireme and Node, depending on whether in-JVM or native support is required. Trireme is therefore provided as a default as there should be no JS coding differences between Trireme and Node, and Trireme requires no manual installation.

Sample usage can be obtained by inspecting the js-engine-tester sub-project. There's a main class that illustrates essential interactions. Here is a snippet of it:

val engine = system.actorOf(Node.props(), "engine")
val f = new File(Main.getClass.getResource("test.js").toURI)
for (
  result <- (engine ? Engine.ExecuteJs(f, Seq("999"))).mapTo[JsExecutionResult]
) yield {
  println(new String(result.output.toArray, "UTF-8"))
  ...

An additional sbt-js-engine sub-project is provided that declares a base for sbt plugins that use the engine. This sub-project has a separate release cycle to jse itself and could be spun off into its own repo at a later point in time e.g. if/when Maven/Gradle support is required. The main point here is that the core JavaScript engine library is not related to sbt at all and should be usable from other build tools.

The library is entirely reactive and uses Akka.

© Typesafe Inc., 2013, 2014

js-engine open issues Ask a question     (View All Issues)
  • about 3 years JS-Engine should not provide an SLF4J implementation
  • about 4 years Interface improvements: Reader instead of File and multiple scripts
  • over 4 years timeout exception after update to 1.0.0 when using timeoutExitValue=0
  • almost 5 years Stream Stdout/Stderr instead of buffering
js-engine open pull requests (View All Pulls)
  • Fix testing multiple versions of Java on Travis
  • Remove slf4j implementation
  • Use slf4j implementation only in test; add slf4j-api dependency
js-engine questions on Stackoverflow (View All Questions)
  • Does Microsoft's ChakraCore provides any performance benefit over Google's V8 when used as JS Engine for Node.js
  • How closure and constructor work from the perspective of js engine
  • Custom alert/popup window and holding JS engine
  • How can I use CommonJS modules with Oracle's new Nashorn JS Engine?
  • What js 'engine' does cordova use?
  • JavaScript Closure. How does JS engine choose Closure Variables?
  • ES6 code on Nodejs 4.x : Is V8 4.5 a native JS engine that runs ES6 directly?
  • How to release cocos2dx-js engine memory when process running?
  • How JS engine treat variable declaration in Condition block?
  • How to set getter setter for nested c++ object in v8 js engine
  • mad js engine /function
  • Using RHINO js engine to make http requests
  • Embedding JS Engine into Windows Phone applications
  • Asynchronously calling a callback function in Spidermonkey JS engine
  • How to run Jurassic (js engine) on wp7 and wp8
  • Exception: cannot run map reduce without the js engine
  • Intercepting DOM and JS engine calls
  • speed of an animation in canvas depends on the js engine speed, is there a way to make an animation appear the same in all browsers?
  • Browser javascript compliant system level js engine
  • How can I start coding with Oracle's Nashorn JS Engine and when will it replace Rhino in the OpenJDK?
  • Is it possible to run IE9 or IE10 Chakra JS engine standalone?
  • Multiple JS Engine Helpers cakephp 2.x
  • Does error in JSONP responce body stop browser JS engine?
  • Estimate browser JS engine speed to conditionally disable animations
  • Error adding SCRIPTITEM_CODEONLY symbol using IE9 JS engine (Chakra)
  • Way to access JS engine Date constants in JavaScript?
  • Fast binary data exchange between JavaScript and C/C++ with SpiderMonkey JS engine
  • Simulating StopIteration of Rhino for other JS engine
  • Android: Difference between WebView and default Browser (core, js engine, HTML5, URI schemes support etc.)
  • How to set the default js engine in firefox SpiderMonkeywhile building?
js-engine list of languages used
Other projects in Scala