Duktape 2.4.0 embeddable JavaScript engine released

Published JavaScript engine release Duktape 2.4.0, aimed at embedding into the code base of projects in the C/C++ language. The engine is compact in size, highly portable and low resource consumption. The source code of the engine is written in C and extend under the MIT license.

The Duktape code takes up about 160 kB and consumes only 70 kB of RAM, and in low memory consumption mode 27 kB of RAM. To integrate Duktape into C/C++ code enough add files duktape.c and duktape.h to the project, and use Duktape API to call JavaScript functions from C/C++ code or vice versa. To free unused objects from memory, a garbage collector with a finalizer is used, built on the basis of a combination algorithm link counting with marking algorithm (Mark and Sweep). The engine is used to process JavaScript in the browser NetSurf.

Provides full compatibility with Ecmascript 5.1 specifications and partial support Ecmascript 2015 and 2016 (E6 and E7), including Proxy object support for property virtualization, Typed Arrays, ArrayBuffer, Node.js Buffer, Encoding API, Symbol object, etc. It includes a built-in debugger, a regular expression engine, and a subsystem for Unicode support. Specific extensions are also provided, such as coroutine support, a built-in logging framework, a CommonJS-based module loading mechanism, and a bytecode caching system that allows you to save and load compiled functions.

In the new release implemented new calls to duk_to_stacktrace() and duk_safe_to_stacktrace() to get stack traces, duk_push_bare_array() to add independent array instances. The functions duk_require_constructable() and duk_require_constructor_call() have been made public. Improved compatibility with the ES2017 specification. Work with arrays and objects has been optimized. Added β€œ--no-auto-complete” option to the duk CLI interface to disable input completion.

Source: opennet.ru

Add a comment