Languages like C and C++ use a technology known as a linker whose purpose is to only include functionality that is used by an application into the executable. The JavaScript portion of Qt is distributed in a library of its own referred to as QtScript which is excluded from applications that don't make use of it.
This is in contrast to Electron which must include the entirety of the Chromium build in every single application distribution.
I think you missed the point - all QML apps use JavaScript. They're planning on relaxing that requirement but as it stands, if you develop a Qt app in the recommended way, you are shipping a JavaScript engine.
In fact the hello world QML app is actually not that much smaller than Electron.
72
u/[deleted] Dec 08 '20
Languages like C and C++ use a technology known as a linker whose purpose is to only include functionality that is used by an application into the executable. The JavaScript portion of Qt is distributed in a library of its own referred to as
QtScriptwhich is excluded from applications that don't make use of it.This is in contrast to Electron which must include the entirety of the Chromium build in every single application distribution.