4 points · by type0 · 10y ago · 2 comments
PyMiniRacer bundles a plain V8. It uses its C++ interface to communicate with it. Executing a JavaScript string in a given context is done with the following steps:
1. Take the JavaScript input as a Python string (in the MiniRacer.eval Python method);
2. Pass it to V8 after a String::NewFromUtf8 conversion;
3. Then V8:
- compiles it with Script::Compile;
- executes it with Script::Run;
4. PyMiniRacer converts the result to an abstract binary interface;5. Return it to Python that will convert it using ctypes.