Understanding the JavaScript (including Node.js) Truffle interpreter
The GraalVM version of JavaScript is an ECMAScript-compliant runtime for both JavaScript, js
, and Node.js, node
. It supports all the features of ECMAScript 2021, at the time of writing this book. It is also Nashorn- and Rhino-compatible and provides complete support for Node.js.
GraalVM Node.js uses the original Node.js source code and replaces the V8 JavaScript engine with the GraalVM JavaScript engine. The replacement is seamless, and the application developers don't have to modify any significant amount of code or configuration to run existing Node.js applications with GraalVM Node.js. GraalVM Node.js provides more features for embedding code from other languages, and accessing data and code, and interoperating code in other language. Node package manager (NPM) is also included in npm
.
In this section, apart from using JavaScript and Node as an alternate runtime for running applications, we will also...