This is unofficially available using _third_party_main.js: https://github.com/joyent/node/blob/430d94ef85f2786522671317ccbd034ef921ae14/src/node.js#L62
вторник, 24 июля 2012 г., 4:40:15 UTC+4 пользователь dsuh написал: > > With v8 3.12.x, there is now an ability to specify a .js file to be > included in the snapshot with the --extra_code flag: > > http://stackoverflow.com/questions/11109538/node-js-v8-how-to-make-my-own-snapshot-to-accelerate-startup > > http://code.google.com/p/v8/source/detail?r=11871 > > It has been noted that Node is not loaded at the time of the snapshot. > Would you consider adding the functionality on build to create a snapshot > of V8+Node+<your app> so that everything can be deployed this way? > > I can imagine people could use this to deploy client-side Node apps > without giving away the cleartext .js files. > Of course this could also mean faster startup of Node in general. > > Well, I have been trying to replace the v8 version in the Node source to > build with this version, but there are fatal build errors. > Are there any pointers on how to modify v8 taken from the svn source so > that it will build under Node? > >