Narcissus

From MozillaWiki
Jump to: navigation, search

Narcissus is a JavaScript interpreter written in pure JavaScript, using the SpiderMonkey engine.

Originally a proof-of-concept by Brendan Eich, Narcissus is being revived as a test-bed for rapidly prototyping new language features for the JavaScript language (and ECMAScript standard).

Downloading

Narcissus is not currently available as a standalone distribution. It is included in the main SpiderMonkey source code tree. To download it, follow the instructions for downloading and building the SpiderMonkey source.

Running at the command-line

After building SpiderMonkey, your build directory includes a Python script called njs.

Usage: njs

Options:
  -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
  -H, --harmony         enable ECMAScript Harmony mode

Running in the browser

Not yet supported. We're working on it.

Development

See Narcissus/Development.

Contributors

  • Tom Austin
  • Brendan Eich
  • Andreas Gal
  • Shu-yu Guo
  • Dave Herman
  • Dimitris Vardoulakis
  • Patrick Walton