tags:

views:

81

answers:

2

Is it possible to convert javascript code to machine code or pure native binary?

+2  A: 

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:

http://www.xuebrothers.net/sh/sh.htm

Cocowalla
+1  A: 

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.

Jörg W Mittag