Apple's Shell Interface to JavaScriptCore

After scanning through some of the most recent changesets over at Apple’s WebKit trac, I noticed a few references to a shell interface to the javascript interpreter which allows you to execute javascript using JavaScriptCore directly. I know there are many exising tools SpiderMonkey, Rhino and others for example, but I though it was enough of a development to mention.

To try it out you’ll have to download a WebKit nightly, and open the Terminal and cd in to the JavaScriptCore.framework directory, and then in to Resources e.g.:

cd /Applications/WebKit.app/Contents/Frameworks/ \ 10.5/JavaScriptCore.framework/Resources

There, you’ll find the jsc executable.

It looks like it’s under heavy development at the moment, so I’d expect Apple to announce when it’s ready for general consumption.

Enjoy.

NB: Only tested on OS X.

2008-08-26