beala edited this page Dec 1, 2012 · 18 revisions
Clone this wiki locally


To run the Narcissus shell, install the SpiderMonkey shell and either set the NJS_SHELL environment variable to the path to the js executable, or creating a symbolic link to js in the top-level Narcissus directory. Then run Narcissus with the njs script.

Usage: njs

  -h, --help            show this help message and exit
  -f FILE, --file=FILE  JS file to load
  -e JS_EXPS, --expression=JS_EXPS
                        JS expression to evaluate
  -i, --interactive     enable interactive shell
  -I, --interactive-meta
                        load Narcissus but run interactive SpiderMonkey shell
  -H, --harmony         enable ECMAScript Harmony mode
  -S, --ssa             enable parse-time SSA construction
  -P, --parse-only      stop after the parsing stage and output pretty-printed
                        source code
  -3, --ecma3-only      restrict source language to ECMA-262 Edition 3
  -p, --paren-free      use experimental paren-free syntax

Running the test suite

Before a pull request is accepted, you must run the SpiderMonkey test suite through njs and make sure that no new tests are failing.

To run the test suite, either set the NJS_TESTS environment variable to the path to the js/src/tests directory in the SpiderMonkey source tree, or create a symbolic link to js/src/tests in the top-level Narcissus directory. Then run the jstests script.

usage: jstests [-h | -a | <test> ...]
  -h      display this usage information and quit
  -a      run all but the slowest tests (those in xfail/narcissus-slow.txt)
  <test>  path to individual test (relative to test directory)

With no arguments, jstests runs all tests except those listed in
xfail/narcissus-failures.txt, which includes all the tests listed in

Technical documentation

See the Narcissus internals for technical documentation.

Get involved

Here's how you can get involved with Narcissus:

Open tasks

Looking for coding projects to contribute to? Here are some areas where we could use your help:

Fork this code!

Narcissus is open source code. You can always fork the code and modify it. If you'd like to contribute your edits back to us, you can do a pull request on Github. However, we can only accept pull requests from people who have filled out a Mozilla committer's agreement. If you have any trouble with this process, feel free to ask us for help on #narcissus and we'll do everything we can to help.