-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any APIs related to V8::ScriptCompiler? #130
Comments
@nodejs/addon-api looks like we might need to implement nodejs/abi-stable-node#51 |
@levimm would a C++ wrapper around the API proposed in nodejs/abi-stable-node#51 help you out? |
@levimm specifically, do you need support for simply executing a script, or do you need access to the intermediate step of compiling the script as well? Can you give us a link to the module you wish to port so we can have a look at your API usage pattern? |
@gabrielschulhof Executing the script is enough for my situation. It's a self addon. Basically, related part of logic just compiles and runs the script. |
@levimm we do not expose the details of the underlying engine. After all, you may not be running on V8 at all. For example, you may be running ChakraCore, or some other JavaScript engine. |
@gabrielschulhof Thanks for your effort. Your commit helps me a lot. |
I'm trying to migrate an old addon using Nan to Napi.
In Nan, there's API called Nan::CompileScript which will invoke v8::ScriptCompiler::Compile to compile the source javascript code. But I couldn't find any related to compile script in Napi.
I guess I have to use both v8 part code and Napi part in the addon. However, I don't know how to convert v8::Value type to Napi::Value.
Please advice.
The text was updated successfully, but these errors were encountered: