changeset 68:293eaba319ac

Added more docs to README.
author Atul Varma <varmaa@toolness.com>
date Thu, 25 Jun 2009 12:36:38 -0700
parents a98e6a1144a9
children be61430630ab
files README
diffstat 1 files changed, 59 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/README	Thu Jun 25 12:20:43 2009 -0700
+++ b/README	Thu Jun 25 12:36:38 2009 -0700
@@ -1,11 +1,55 @@
-About Spidermonkey Playground
------------------------------
+=============================
+About SpiderMonkey Playground
+=============================
+
+This is a simple C/C++ command-line program that experiments with the
+SpiderMonkey JavaScript engine.
+
+File Layout
+-----------
+
+pavement.py                    Paver [1] script to build binaries.
+
+sample-module.js               Sample SecurableModule.
+
+tcb.js                         Trusted Code Base script.
+
+server-socket.cpp/h            Simple native implementation of a JS socket
+                               object.
+
+memory_profiler.cpp/h          Native memory profiling functionality.
+
+memory_profiler_server.js      Script to provide a RESTful web service
+                               exposing memory profiling data about another
+                               JS runtime.
 
-This is a simple C/C++ command-line program that embeds SpiderMonkey
-and exposes a number of the JSAPI's functions [1] to a Trusted Code
-Base written in JS.  The goal here is to provide developers with an
-easy way to explore and experiment with JavaScript security models in
-a high-level language before actually implementing one in C/C++.
+wrapper.cpp/h                  Native implementation of JS wrapper/membrane.
+
+spidermonkey-playground.cpp/h  Main executable embedding SpiderMonkey and
+                               implementing many global JS functions.
+
+[1] http://www.blueskyonmars.com/projects/paver/
+
+Usage
+-----
+
+(1) Modify pavement.py to your needs--it currently requires a full
+    build of Mozilla somewhere on your system, which is unfortunate,
+    but SpiderMonkey 1.8/1.8.1 hasn't yet been released as standalone.
+
+(2) Build the binaries by running 'paver'.
+
+(3) Run 'spidermonkey-playground'. Right now the executable just runs
+    some tests and starts the memory profiling server at the very end.
+
+Security Experimentation
+------------------------
+
+To experiment with security, we expose a number of the JSAPI's
+functions [1] to a Trusted Code Base written in JS.  The goal here is
+to provide developers with an easy way to explore and experiment with
+JavaScript security models in a high-level language before actually
+implementing one in C/C++.
 
 The playground currently includes a highly experimental implementation
 of SecurableModules [2] that allows for the exportation of
@@ -22,3 +66,11 @@
 [3] https://developer.mozilla.org/en/XPConnect_wrappers
 [4] https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JSClass
 [5] http://code.google.com/p/google-caja/
+
+Memory Profiling Experimentation
+--------------------------------
+
+A prototype implementation of a memory profiling web server providing
+a REST API to the state of a frozen JS runtime is also provided.  The
+actual server is written using JavaScript, and runs in a separate
+JS runtime from the frozen one that it exposes.