Hi all,
I am developing a custom CMS and I want users to be able to provide their own scripts.
A solution would be to use therubyracer as a sandbox, but for performance reasons it would be nice to know if scripts can be precompiled, stored and executed later without further parsing, and if this would make a real impact in performance or if it's enough to just eval() them.
I am using V8::C::ScriptData::PreCompile and I think its return value is what I need to store for later execution, but I don't know how to add data to that when I need to execute it.
A typical example would be to precompile an user-provided function (via exports probably) with ScriptData::PreCompile and then call it passing some environment data.
How can I accomplish that?
If you think that there is a better approach for this matter, please tell me. I could use another language or even a DSL as long as they are fast enough and secure.
Thanks in advance,
Rodrigo.