svn checkout http://v8.googlecode.com/svn/trunk/ v8
then just build with scons (make sure you already have installed scons)
jeos@jeos:~/v8$ scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
...........
You will get libv8.a
Then build js shell from sample
jeos@jeos:~/v8$ scons sample=shell
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
You will get a file named shell
jeos@jeos:~/v8$ ./shell
V8 version 0.3.4.1
>
Run some js test
> for(var i=0; i<5;i++) print(i);regex test
0
1
2
3
4
> /^[a-z]*$/.test("abcd")
true
>
Wow, Pretty easy huh?
No comments:
Post a Comment