v8js Ubuntu 16

From DreamFactory
Jump to: navigation, search

This module allows you to execute server-side JavaScript, using the V8 engine.

These instructions area adapted from https://github.com/phpv8/v8js/blob/master/README.Linux.md

  1. Install Dependencies
    • $ sudo apt-get install build-essential git python libglib2.0-dev
  2. Install Depot Tools
    • $ cd /tmp
    • $ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    • $ export PATH=`pwd`/depot_tools:"$PATH"
  3. Download V8
    • $ fetch v8
  4. Setup GN
    • $ cd v8
    • $ tools/dev/v8gen.py -vv x64.release
    • $ echo is_component_build = true >> out.gn/x64.release/args.gn
  5. Build V8
    • $ ninja -C out.gn/x64.release/
  6. Install to /opt/v8
    • $ sudo mkdir -p /opt/v8/{lib,include}
    • $ sudo cp out.gn/x64.release/lib*.so out.gn/x64.release/*_blob.bin /opt/v8/lib/
    • $ sudo cp -R include/* /opt/v8/include/