var path = require('path'),
    parser = require('./parser'),
    compiler = require('./compiler'),
    Script = process.binding('evals').Script;

require.paths.unshift(path.join(__dirname, '..'));

module.exports = function(dust) {
  compiler.parse = parser.parse;
  dust.compile = compiler.compile;

  dust.loadSource = function(source, path) {
    return Script.runInNewContext(source, {dust: dust}, path);
  };

  dust.nextTick = process.nextTick;

  // expose optimizers in commonjs env too
  dust.optimizers = compiler.optimizers;
}

@@ -101,48 +101,26 @@
     
-Script = process.binding('evals').Script
+vm = require('vm')
 ;%0A%0Ar
@@ -333,14 +333,10 @@
 urn 
-Script
+vm
 .run

update to support evals moving to require('vm')