Loading

Building Javascript Shell with V8 (Chrome's Engine)

First of all, checkout from google svn.

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);
0
1
2
3
4
regex test
> /^[a-z]*$/.test("abcd")   
true
>

Wow, Pretty easy huh?

No comments:

က်ေနာ္ဖတ္ေသာ အျခား ဘေလာ့ / ဆိုဒ္မ်ား