Running V8 Javascript Engine Standalone

前端 未结 9 1842
悲&欢浪女
悲&欢浪女 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:55

    I think this might have changed. I read the manual and build v8 like this:

    moose@pc08$ svn co http://v8.googlecode.com/svn/trunk v8-trunk
    moose@pc08$ cd v8-trunk
    moose@pc08$ make dependencies
    moose@pc08$ make ia32.release
    

    added export PATH=${PATH}:/home/moose/Downloads/v8-trunk/out/ia32.release to my .bashrc

    moose@pc08 ~ $ source ~/.bashrc
    moose@pc08 ~ $ d8 A_tic_tac_toe_Tomek.js < A-small-practice.in
    

    (With javascript from aditsu and A-small-practice.in from Google Code Jam)

    0 讨论(0)
  • 2020-11-27 09:55

    If you use ArchLinux, you can use pacman -S v8 to install it. Then use d8 to start it in your shell. Enjoy it.

    0 讨论(0)
  • 2020-11-27 09:55

    In case you would like to run your javascript source code using the v8 engine or any version of it, you may utilize the jsvu command-line tool. It is developed and maintained by Google engineers and, besides, it offers the feature of installing other javascript engines apart from v8, such as spidermonkey, chakracore, javascriptcore, and xs.

    0 讨论(0)
提交回复
热议问题