Permalink
Browse files

Not a very helpful readme, but hopefully slightly so.

  • Loading branch information...
1 parent f22fa0b commit 046651a28b0f2e196714bed61392044ddf2dead6 @fzzzy committed Mar 2, 2012
Showing with 20 additions and 0 deletions.
  1. +20 −0 README
View
20 README
@@ -0,0 +1,20 @@
+rust-spidermonkey provides rust bindings to libmozjs, also known as the SpiderMonkey JavaScript interpreter. To build the library for use in rust programs, type "make".
+
+To build the test program, which takes command line arguments and either executes them as scripts (each in it's own rust task) or loads them into dom.js if they are html files, type "make test".
+
+./test
+
+ Runs the test.js script, which happens to load the foo.html file as well.
+
+./test foo.html
+
+ Just load and parse an html file with dom.js.
+
+./test foo.js
+
+ Just run a script with a context which includes a 'print' function as well as a "document" and "window" implementation provided by dom.js.
+
+./test foo.html foo.js [...]
+
+ Start up a number of independent JavaScript environments, each of which have their own Rust task, and parse or execute them, as appropriate.
+

0 comments on commit 046651a

Please sign in to comment.