How to turn the V8 compiled javascript into an EXE?

前端 未结 4 1412
面向向阳花
面向向阳花 2021-01-11 15:05

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?

4条回答
  •  猫巷女王i
    2021-01-11 15:46

    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.

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

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

    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.

提交回复
热议问题