如何将V8编译的javascript转换为EXE? [英] How to turn the V8 compiled javascript into an EXE?

查看:84
本文介绍了如何将V8编译的javascript转换为EXE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道google的v8将javascript编译为本机(如果我理解正确,则为二进制)代码.
有没有办法将输出转换为exe?

I know that google's v8 compiles javascript into native machine (binary if I understand correctly) code.
Is there a way to take the output and turn it into a exe?

推荐答案

我认为您无法使用V8直接将一段JavaScript转换为可执行文件,但您可能可以制作将V8引擎与JavaScript并独立运行.

I don't think you can directly turn a piece of JavaScript into an executable using V8, but you can probably make an application that bundles the V8 engine with the JavaScript and runs it as a stand-alone.

您可以在其项目页面上找到有关V8的所有信息.

You can find all information about V8 on its project page.

还请注意,JavaScript是一种动态语言,因此无法完全编译.使用V8,它是JIT编译的(例如,.NET.)尽管如此,仍然可以将其转换为独立的可执行文件(例如,.NET.)

Also note that JavaScript can't be completely compiled as it's a dynamic language. With V8, it's JIT-compiled (like .NET, for example.) It's still possible to turn it into a stand-alone executable though (like .NET, for example.)

如果您要开发使用HTML进行渲染的独立应用程序,可以查看

If you want to develop stand-alone applications that make use of HTML for rendering, you could have a look at Adobe Air as well.

这篇关于如何将V8编译的javascript转换为EXE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆