If you convert it back to javascript for V8, then anyone else could do the 
same so you won't have really gained anything- no performance, because 
you're giving V8 js anyway and no code protection, because anyone can take 
your code and use it to convert the binary to javascript themselves.

It seems to me like the only way this could work is if you could get V8 to 
accept and run something other than JavaScript. Not sure if it's possible 
to give V8 bytecode for execution instead of Javascript? Maybe you could 
fork V8 and use a custom implementation with your packages?

Converting JavaScript to a self-contained, small, native binary would be 
very cool, but quite a bit of a project, obviously. Doing something like 
including the whole V8 in the binary would not be very useful.

On Saturday, May 11, 2013 9:17:28 AM UTC-4, Fred Chien wrote:
>
> Currently, NPK is using Uglify-JS to do code protection, something's like 
> minimizing and obfuscation.
>
> We are implementing a feature that putting JavaScript in C++ code and make 
> it become Node.js native module. I think it could do more things that's 
> like converting JavaScript to pure C++ code in future. :-S
>
> BTW, another idea is, compiling JavaScript to bytecode and store it in 
> native module. Convert it to JavaScript for V8 in runtime. I'm not sure 
> whether it works or not.
>
> Fred
>
>
> 2013/5/11 mscdex <msc...@gmail.com <javascript:>>
>
>> On May 11, 2:03 am, Fred Chien <cfsgh...@gmail.com> wrote:
>> > NPK aims to package project which is based on Node.js, and bundle all
>> > JavaScript files to make all in one file, even protect source code.
>>
>> How does it protect the source code? What is to stop someone from
>> simply calling toString() on a function?
>>
>> --
>> --
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines: 
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to nod...@googlegroups.com<javascript:>
>> To unsubscribe from this group, send email to
>> nodejs+un...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "nodejs" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to nodejs+un...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to