Skip to content

Latest commit

 

History

History
120 lines (94 loc) · 4.84 KB

README.md

File metadata and controls

120 lines (94 loc) · 4.84 KB

License Build Status

Dependency Status OptionalDependency Status devDependency Status

Browser Support

Furious.js

Furious.js is a scientific computing package for JavaScript. Furious.js features:

  • Provides n-dimensional array (NDArray) class
  • Programming interface similar to NumPy
  • Works with all modern browsers and Node.js
  • Accelerates computation on Portable Native Client (PNaCl) and WebCL
  • Computes asynchronously, without stalling the GUI
  • Functionality covered with unit tests (Try it!)
  • Comes with extensive documentation

Backends

Currently Furious.js provides three computational backends:

  • JavaScript backend that works in all modern JS engines (Typed Array support required).
  • Portable Native Client that works in Google Chrome and other Chromium-based browsers.
  • WebCL backend that can be used with Node.js (via node-webcl) and WebKit-WebCL.

Normally Furious.js would automatically detect the optimal backend, but it is possible to specify it manually.

Development

System pre-requisites

  • Windows, Linux, or OS X operating systems.
  • Python 2.x (we recommend to use the latest 2.7 release).
  • Ninja build system. Add the directory with ninja (or ninja.exe) executable to the PATH environment variable. Add the misc directory with ninja_syntax.py to the PYTHONPATH environment variable.
  • Protocol Buffers compiler. Add the directory with protoc executable to the PATH environment variable.
  • Native Client SDK. Use the naclsdk/naclsdk.bat script to install one of the Pepper toolchains. For development, we recommend to use pepper_canary toolchain. For deployment, the current stable toolchain is recommended. Make an environment variable NACL_SDK_ROOT point to the toolchain directory (e.g. C:/naclsdk/pepper_canary if you use pepper_canary toolchain and the Native Client SDK is unpacked to C:/naclsdk)
  • Node.js and Node Package Manager (npm).

Node-WebCL prerequisited (optional)

  • OpenCL SDK from Intel, AMD, or nVidia (except on Mac)
  • GLEW library (except on Windows)
  • GLFW 3 library (except on Windows)
  • FreeImage library (except on Windows)
  • AntTweakBar library (except on Windows)

Cloning the repository

If you intend to develop Furious.js, we recommend that you fork the repository. Then clone your fork with

git clone https://github.com/<GITHUB-USERNAME>/furious.js.git

Installing Node.js modules

If you do not intend to use Node-WebCL, navigate to Furious.js directory and execute

npm install --no-optional
npm install -g grunt-cli

If you plan to use Node-WebCL, you'll need to install the upstream version of Node-WebCL, and its dependencies.

  • Clone and build node-glfw repository
git clone https://github.com/Maratyszcza/node-glfw.git
cd node-glfw
npm link
  • Clone and build node-image repository
git clone https://github.com/Maratyszcza/node-image.git
cd node-image
npm link
  • Clone node-webgl repository, link its node-glfw dependency, and build
git clone https://github.com/Maratyszcza/node-webgl.git
cd node-webgl
npm link node-glfw
npm link
  • Clone the node-webcl repository, link its node-image and node-webgl dependencies, and build
git clone https://github.com/Maratyszcza/node-webcl.git
cd node-webcl
npm link node-webgl
npm link node-image
npm link
  • Navigate to Furious.js directory, link node-webcl dependency, and install other dependencies
npm link node-webcl
npm install
npm install -g grunt-cli

Installing Native Client libraries

Follow the official instructions to get a copy of naclports repository. Next, navigate to src directory and install protobuf library for your PNaCl toolchain:

NACL_ARCH=pnacl make protobuf

Building everything

grunt

Building the PNaCl backend only

python configure.py
ninja