English | 中文
QtScript interface based on QuickJS
QuickQtScript implements a subset of the QtScript API on top of QuickJS-NG, covering the most commonly used functionality. More advanced features will be added gradually.
The primary goal of this project is to allow upper-layer code written against the QtScript API to migrate from Qt's built-in script engine to the QuickJS engine with zero changes.
Switching engines is straightforward. There is a ScriptEngine.pri file under src/QScriptEngine. Simply include it in your project's .pro file.
For example, in examples/QQScriptDemo/QQScriptDemo.pro:
To use Qt's built-in script engine:
QT += script
# include($$PWD/../../src/QScriptEngine/ScriptEngine.pri)To use the QuickJS engine:
# QT += script
include($$PWD/../../src/QScriptEngine/ScriptEngine.pri)QuickJS does not expose a public API for real-time script position information (file, line, column). This information is essential for implementing QScriptEngineAgent, so we have made targeted modifications to parts of the QuickJS source.
To see exactly what was changed, refer to the fork repository: G-Yong/quickjs