1

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++.

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.

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.

This leads me down quite a different path. What I wonder now is whether it will be possible to use JavaScriptCore to basically replace what I would use Lua for.

2
  • "never being able to get V8 for a submission to the iOS App Store." Why? Is this a technical or legal issue? Commented Jul 2, 2012 at 5:21
  • 1
    Considering that Google has released Chrome for iOS and it uses UIWebView rather than V8 it's clear Apple will not approve V8. Whether it is simply based on the JIT & marking pages executable issue or not is up for debate. Commented Jul 2, 2012 at 5:23

2 Answers 2

2

Awesome! Somebody has already done this.

Sign up to request clarification or add additional context in comments.

Comments

1

Just as a side note to this old question: Apple has made JavaScriptCore a public API in IOS 7 so it could be used for dynamic scripting or other application logic.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.