Closed ansarizafar closed 9 months ago
In my experience JavaScript compiled to native code ahead of time is bigger and slower than a good byte code representing and a tracing JIT (like node's v8). That's because types are only reliably known at runtime, so AOT generated code needs to be generic, which makes it larger and slower.
In Slint, we are not going to implement an AOT JS to native compiler - that's not in scope.
Is there a specific benchmark we should target or AOT engine that Slint should support?
There was a Javascript compiler project https://nectar.js.org/ but I think the project is not maintained anymore.
We don't plan to implement this at the moment.
Slint UI framework is absolutely amazing. Slint Javascript SDK is currently using an interpreter to transform UI code at runtime which is not good performance and native binary size. It would be great If both Javascript and Slint UI code can be compiled to native code. Here is the relevant disscussions on this topic. https://chat.slint.dev/public/pl/1ygwzcot83nodxbqbcmba8mfac