Installing SilkJS

SilkJS is currently available only via GitHub. Intallation is a breeze, though!

View project on GitHub SilkJS Google Group

Build Notes

Currently SilkJS builds on Ubuntu/Linux and Mac OSX. Building for Ubuntu is rather straightforward, thanks to the apt package management system. Building for OSX is a bit more complicated as certain libraries SilkJS links against must also be built.

NOTE: Some systems are configured for IPv6 in their /etc/hosts files (Mac OSX for one). To run the ab tests, you will need to use instead of http://localhost:9090/(whatever)

These instructions are for building SilkJS in your ~/src directory (for both OSX and Ubuntu). If you don't have a ~/src directory, you can create it from the comand line:

$ mkdir ~src; cd ~src

OSX LION Quick Install

There is an experimental quick install for OSX Lion. Simply paste the following line into a terminal window:

curl | sh

If you have feedback on the build process or these instructions, please email me at or post to the SilkJS Google Group.

Ubuntu Instructions

These instructions are for Ubuntu Oneiric, though they will work for other versions of Ubuntu as well. I like to build my C/C++ projects in my ~mschwartz/src directory. Feel free to adapt these instructions to suit your preferences.

1. Install Prerequisites

SilkJS compiles and links against several libraries that are trivial to install using the apt package manager.

After building and testing SilkJS, you might want to install it via the Install.js script.

First the essentials:

$ sudo apt-get install build-essential subversion git

General purpose libraries:

$ sudo apt-get install libmm-dev libssl-dev libgd2-xpm-dev libncurses5-dev libcurl4-openssl-dev libssh2-1-dev libcairo2-dev

Database interface libraries:

$ sudo apt-get install libmysqlclient-dev libsqlite3-dev libmemcached-dev

The apache2-util package installs the ab program, which can be used to benchmark SilkJS and other HTTP servers:

$ sudo apt-get install apache2-utils

2. Get SilkJS from GitHub

$ mkdir src

$ cd src

$ git clone SilkJS

3. Build and test

SilkJS should now build:

$ cd SilkJS

$ make

$ make install

To see it works:

$ ./silkjs httpd/main.js

Point your browser at http://localhost:9090/

Mac OSX Instructions

Building for OSX is much more complicated, and there may be some issues with the new gyp build system for v8 that prevent SilkJS from being built for OSX using gyp.

According to the gyp build instructions page (for v8):

"trying to build x64 targets on Mac currently fails."

That said...

1. Install XCode

Install Xcode from the App Store. It's free!

2. Install SubVersion

Install the command line binary version of SubVersion from this page:

Make sure to edit your ~/.profile to include this line at the end:
export PATH=/opt/subversion/bin:$PATH
Close and open your shell window again.

3. Install scons

scons is a python based build system that is used to build/compile the v8 JavaScript engine. It is being depricated in favor of the gyp build system, but for now scons is the only way to build x64 (e.g. Lion) versions of v8.

Download scons-2.1.0.tar.gz from to your ~/src directory. Then in your shell window:

$ tar xzvfp scons-2.1.0.tar.gz

$ cd scons-2.1.0

$ sudo python install

4. Get SilkJS from GitHub

$ cd ~/src

$ git clone SilkJS

5. Build and test

SilkJS should now build:

$ cd SilkJS

$ make

$ make install

To see it works:

$ ./silkjs httpd/main.js

Point your browser at http://localhost:9090/

blog comments powered by Disqus