func (vm *VM) SetModulesDir(path string) {
	vm.setUserData("MODULES_DIR", path)
}
SetModulesDir sets lookup directory for modules to import from.
package wren
import "C"
import (
	"bytes"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"os"
	"path/filepath"
	"reflect"
	"runtime"
	"strings"
	"unsafe"
)
var (
	vmMap     = make(map[*C.WrenVM]*VM)
	errWriter io.Writer
)
type VM struct {
	vm               *C.WrenVM
	classes, methods map[string]unsafe.Pointer
	userData         map[string]interface{}
	userDataPtr      unsafe.Pointer
	outWriter        io.Writer
}
func NewVM() *VM {
	var config C.WrenConfiguration
	C.wrenInitConfiguration(&config)
	config.writeFn = C.WrenWriteFn(C.write)
	config.bindForeignMethodFn = C.WrenBindForeignMethodFn(C.bindMethod)
	config.bindForeignClassFn = C.WrenBindForeignClassFn(C.bindClass)
	config.errorFn = C.WrenErrorFn(C.writeErr)
	config.loadModuleFn = C.WrenLoadModuleFn(C.loadModule)
	vm := VM{vm: C.wrenNewVM(&config)}
	vm.classes = make(map[string]unsafe.Pointer)
	vm.methods = make(map[string]unsafe.Pointer)
	vm.userData = make(map[string]interface{})
	vmMap[vm.vm] = &vm
	runtime.SetFinalizer(&vm, func(vm *VM) {
		C.wrenFreeVM(vm.vm)
		delete(vmMap, vm.vm)
	})
	return &vm
}