From f8203e1a73b7bd110bc55b3e241fd7ed234a2f10 Mon Sep 17 00:00:00 2001 From: andrewtch Date: Sun, 7 Jul 2013 23:29:05 +0300 Subject: [PATCH] Update README.md Updated readme to fix #19 --- README.md | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 179ae6c..3261934 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The extension allows you to execute Javascript code in a secure sandbox from PHP Minimum requirements -------------------- -- V8 Javascript Engine library (libv8) version 3.2.4 or above (trunk) +- V8 Javascript Engine library (libv8) master (trunk) V8 is Google's open source Javascript engine. V8 is written in C++ and is used in Google Chrome, the open source browser from Google. @@ -20,6 +20,36 @@ Minimum requirements This embedded implementation of the V8 engine uses thread locking so it should work with ZTS enabled. However, this has not been tested yet. + +COMPILING LATEST VERSION +======================== + +Compile latest v8 +----------------- + +``` +cd /tmp +git clone https://github.com/v8/v8.git +cd v8 +make dependencies +make native library=shared -j8 +sudo cp out/native/lib.target/libv8.so /usr/lib/libv8.so +sudo cp include/v8* /usr/include + +``` + +Compile php-v8js itself +----------------------- + +``` +cd /tmp +git clone https://github.com/preillyme/v8js.git +cd v8js +phpize +./configure CXXFLAGS="-DV8_USE_UNSAFE_HANDLES=1" +make +sudo make install +``` PHP API