Running V8 Javascript Engine Standalone

前端 未结 9 1894
悲&欢浪女
悲&欢浪女 2020-11-27 09:05

I want to run a Javascript console on top of V8. How do I do this?

9条回答
  •  误落风尘
    2020-11-27 09:30

    To build the developer console, rather than the example 'shell' toy application, copy-paste the below commands to your terminal.

    sudo apt-get install subversion scons libreadline-dev
    svn co http://v8.googlecode.com/svn/trunk v8
    cd v8/
    scons console=readline d8
    

    These instruction will work for Ubuntu/Debian with a "generic" kernel. For other distributions, you will need to replace the apt-get command with whatever package tool you have available. On 64-bit systems you may need to add arch=x64. The console=readline option enables the readline system, to make it feel a bit more like a standard shell.

    More complete documentation here: http://code.google.com/apis/v8/build.html


    Note:

    enter image description here

    See also: Building v8 with GYP

提交回复
热议问题