New issue
Advanced search Search tips
Starred by 1 user

Issue metadata

Status: Invalid
Owner: ----
Closed: Apr 2015
HW: ----
NextAction: ----
OS: ----
Priority: ----
Type: ----

Sign in to add a comment

Using v8 in a Windows 8 HTML/JS Metro Style App

Reported by, May 3 2012

Issue description

Hi, how do I install the v8 engine into a Windows 8 HTML 5/JavaScript Metro Style App? It does not run off C++, it uses HTML 5, JavaScript, and CSS.
Status: Invalid
V8 is a JavaScript engine -- that means, it is the very program that executes JavaScript. Re-writing V8 itself in JavaScript would not be useful, since if you already have a way to execute JavaScript, you don't need V8.

It would be possible to write a JavaScript engine in JavaScript, I guess, but that would be an entirely separate project; also it would be pretty pointless for real usage scenarios because the unnecessary indirection would be too slow.

Regarding inclusion of V8 into Metro apps that for whatever reason want to include their own JavaScript engine, that is unfortunately not possible because in their Metro app specification, Microsoft forbids the use of just-in-time code generation, which is one of the basic design principles of V8. So, again, you would have to write another JavaScript engine for that purpose, and it would have to be designed very differently from V8. (AFAIK there's an exception to this rule for web browsers that also provide a desktop app mode, but I'm not sure about the specifics.)

Comment 2 by, May 6 2012

The reason I ask is that a chrome app that requires the runtime can not run in my app without the engine. Is there a way to fix this?
You probably didn't understand: this isn't a V8 issue, it's a restriction by Microsoft about what Metro Apps can do. Those questions are more likely to get a qualified answer by posting in the appropriate Microsoft forum. Though I think comment #1 is likely correct and there's no way code generation will work in Metro Apps.

Sign in to add a comment