Back to Napajs

Napa runner

examples/tutorial/napa-runner/README.md

0.2.31.1 KB
Original Source

Napa runner

Napa runner is an example to embed Napa.JS into a C++ program. It simply runs JavaScript with all Napa capability without Node dependency from command line.

How to build

  1. Go to napajs root directory and run node build.js embed to build napa library for embeded mode.

NOTE: This step may take about 30 mins, because it will build V8 library from Node. We are using node v6.10.3, a stable version can build as a library. It is specified in embedded.js and napa-runner CMakeLists.txt. Please update both of them if you want to use a different version of Node/V8.

  1. Go to directory of examples/tutorial/napa-runner, and run cmake-js build to build napa runner

NOTE: Build solution of napa-runner is provided only for linux system so far. Windows / Mac OS support will come in near future.

How to use

  1. Run npm install to intall required npm modules
  2. Run ./bin/napa-runner emstimate-PI.js