Cagatay Dogan edited this page May 3, 2015 · 20 revisions

Welcome to the SilkJS wiki!

SilkJS is a C++ program that links with the Google V8 JavaScript engine and several other Unix/Linux libraries. It provides, as simple and direct as it can, methods that make calling operating system and other library functions from JavaScript context possible.

Running SilkJS is as simple:

path_to/SilkJS some_javascript_file.js

SilkJS simple loads and compiles the specified JavaScript file, then calls a main() function provided by the JavaScript program. If additional arguments are passed on the command line after the main JavaScript file, they are passed to the main() function.

It's as simple as that!

SilkJS is not NodeJS. It merely provides the "glue" to the operating system and other library functions to make them callable from your JavaScript program.

SilkJS does include a very fast pre-fork model HTTP server written almost entirely in JavaScript. The HTTP server has remarkable performance characteristics. It is several times faster than NodeJS at serving static files, and faster than Apache + PHP (5.3) when running simple "hello, world" requests. SilkJS/HTTP most certainly will outperform Apache + PHPonce the application is a real-world useful one.

A great deal of time has been spent on performance. SilkJS includes MySQL glue that is much faster than PHP, for example.

If you do want a server-side JavaScript solution that uses V8, is very fast, and doesn't require you to write "nested callback hell" style code, then give SilkJS a look.


See http://groups.google.com/group/silkjs


See https://github.com/mschwartz/SilkJS/wiki/Debugging


Related Projects

By GitHub user dorgan

I've ported jsmart(http://code.google.com/p/jsmart) over to work with SilkJS. It supports the following:

  • File based templates
  • MySQL based templates
  • "In-Memory" template caching

This fork can be found here: https://github.com/dorgan/jsmart-silk