Duktape JavaScript engine added to Polkit

A backend has been added to the Polkit toolkit, which is used by distributions to handle authorization and define access rules for operations that require elevated access rights (for example, mounting a USB drive), to allow the use of the Duktape embeddable JavaScript engine instead of the previously used Mozilla Gecko engine (default as and before the assembly with the Mozilla engine is carried out). The JavaScript language in Polkit is used to define access rules that interact with the privileged background process polkitd using the "polkit" object.

Duktape is used in the NetSurf browser and is characterized by its compact size, high portability and low resource consumption (the code takes about 160 kB, and 64 kB of RAM is enough to execute). Provides full compatibility with Ecmascript 5.1 specifications and partial support for Ecmascript 2015 and 2016 (ES6 and ES7). Specific extensions are also provided, such as support for coroutines, 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. The structure includes a built-in debugger, an engine for executing regular expressions and a subsystem for Unicode support.

Source: opennet.ru

Add a comment