See the documentation, which has examples for this:
https://github.com/v8/v8/wiki/Embedder's-Guide

If you insist on adding this in V8 rather than in your embedding
application, it's more complicated (and, unless you have a strong reason,
probably not a good idea...). Look at bootstrapper.cc and work your way
through the source from there.

On Wed, Jun 27, 2018 at 3:05 PM Abhishek Kanike <kai.dranzer32...@gmail.com>
wrote:

> Hi v8 users,
>
> I would like to call a function from javascript which when processed by v8
> engine, calls my own library function.
> For example,
>
>
> *In javascript (main.js):*
> var start = Date.now();
> myFunctionInV8();
> // js code...
> // js code...
> // js code...
> var end = Date.now();
>
>
>
>
>
> *In v8:// may be in v8platform*void myFunctionInV8(){
>    // calling my external library functions...
> }
>
>
> What is the best way to achieve this? I want this function call eventually
> in v8 engine only.
>
> Regards,
> K Abhishek
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to