제일 빠른 JavaScript 엔진이라고 합니다.
gyp인지 설치하라고 하는데, 없이도 할 수는 있다.
set PATH=%PATH%;C:\Python27\Scripts scons library=static mode=debug msvcrt=shared env="PATH:%PATH%,LIB:%LIB%,INCLUDE:%INCLUDE%" arch=x64
C++ 쪽의 함수를 등록하고, 그걸 스크립트를 통해 호출하기
using namespace v8; Handle<Value> Alert(const Arguments& args) { String::AsciiValue str(args[0]); //printf(str); return Undefined(); } void Test() { HandleScope handle_scope; Local<ObjectTemplate> global = ObjectTemplate::New(); global->set(String::New("alert"), FunctionTemplate::New(Alert)); Persistent<Context> context = Context::New(NULL, global); Context::Scope context_scope(context); Handle<String> source = String::New("alert(\"Hello world\");"); Local<Script> script = Script::Compile(source); script->Run(); context.Dispose(); }