title: Embedding javascript into an application (like Lua)
body: <p>I do a lot of web-related work with Javascript (some mundane web app stuff, some bleeding-edge software renderer/WebGL stuff), and I also have game-related projects which I code mostly in C++.</p>
  
  <p>I have intended for the C++ bits use Lua to accomplish dynamic scripting functionality, but I am starting to wonder if it may serve me well to somehow embed a Javascript engine into my codebase so as to minimize the amount of context-switching I do, because it is going to make me cringe if the time comes that I find myself needing to port Lua code to JS or port JS code to Lua. </p>
  
  <p>The V8 Javascript engine is embeddable and everything for a desktop C++ application and that'd be the end of it but the monkey wrench in this situation here is the problem of never being able to get V8 for a submission to the iOS App Store. </p>
  
  <p>This leads me down quite a different path. What I wonder now is whether it will be possible to use <code>JavaScriptCore</code> to basically replace what I would use Lua for. </p>