1

Source Code secrecy is useful sometimes, specially if there's some risk of it being leaked from the servers. As I've read, google's V8 engine compiles the javascript code to native code on the machine. Since V8 is directed to browsers, I can assume that NodeJS compiles the JS everytime we run it, since it's intended to compile it as fast as possible. I've searched about a way to compile NodeJS apps to native code, in order to run them without the javascript source, but I saw that that's not possible.

So, given the way that V8 works, is it impossible to compile NodeJS apps to native code because NodeJS didn't implement this feature, or because of the way NodeJS uses the V8 engine? Would it be possible, somehow, if NodeJS team wanted to?

Gatonito
  • 1,662
  • 5
  • 26
  • 55
  • related: http://stackoverflow.com/questions/9413123/secure-distribution-of-nodejs-applications – Daniel A. White Aug 16 '16 at 00:56
  • Whatever V8 does or doesn't do with respect to compiling to native code is entirely internal to V8 in memory. And compiled code cannot be output from V8 or input into V8. – jfriend00 Aug 16 '16 at 03:47
  • Also, if you have problems with securing access to your servers, then precompiling your source code is likely the least of your problems. – jfriend00 Aug 16 '16 at 03:49

0 Answers0