I want to run a Javascript console on top of V8. How do I do this?
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)
If you use ArchLinux, you can use pacman -S v8
to install it.
Then use d8
to start it in your shell.
Enjoy it.
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.