Is there a native machine code compiler for JavaSc

2019-01-10 14:47发布

Is there a native machine code compiler for JavaScript? I'm not talking about a VM. If it doesn't exist can it be done?
I am wondering if it can be compiled to binary due to the dynamic nature of the language.

8条回答
小情绪 Triste *
2楼-- · 2019-01-10 15:09

Google V8 engine compiles JavaScript into native machine code. This feature is used in the EncloseJS compiler which I wrote for for node.js and io.js projects.

查看更多
对你真心纯属浪费
3楼-- · 2019-01-10 15:16

Please note that all of these solutions are DOMless, so no libraries like angular.js or jquery, only underscore.js/lodash

Following up to Falaina's answer, PyPy does have a dist for JavaScript

Also, Appcelerator Titanium has a js > JavaBit > android

Finally, node.js can use nexe Explained in this other answer

查看更多
登录 后发表回答