Is it possible to convert javascript code to machine code or pure native binary?
asked May 28, 2010 at 6:31
SamSol
2,8927 gold badges38 silver badges58 bronze badges
-
2Anything is possible, but what would be the point? Much of the power of Javascript comes from it's nature as an interpreted language.Dean Harding– Dean Harding2010年05月28日 06:35:00 +00:00Commented May 28, 2010 at 6:35
2 Answers 2
Not sure why anyone would want to do this, but there is an example here of how to generate a .NET executable file from JScript (not quite the same thing as JavaScript, I know):
http://www.phpied.com/make-your-javascript-a-windows-exe/
There is also Script2EXE here, which can convert JavaScript to a Win32 executable:
answered May 28, 2010 at 6:40
Cocowalla
14.4k6 gold badges77 silver badges116 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
Sure. Almost all modern JavaScript engines have a native code compiler. Google's V8 doesn't even have an interpreter, it only has a native code compiler.
answered May 28, 2010 at 8:42
Jörg W Mittag
371k79 gold badges457 silver badges666 bronze badges
Comments
lang-js