Hi,

You can think of V8 as a library used for compiling and running Javascript.
Chrome/Chromium, d8 and Node.js are all "embedders" of V8, i.e.
applications that use this library. d8 is a very simple, minimal wrapper
around the library that we use primarily for debugging, testing, and as a
"demo" of how to use the V8 API. Node.js is a larger application that adds
a whole bunch of stuff on top of V8, for example 'requires' for module
loading, file access APIs, all the server stuff, etc etc. You can think of
the difference as "d8 runs Javascript code" and "Node.js runs programs
written for Node, using Javascript as the language". If you just want to
run an algorithm written in Javascript, d8 is fine, but if you want to run
something that uses npm packages, you need Node.

Hope that helps,
Leszek

On Fri, Nov 13, 2020 at 9:25 AM anlex N <[email protected]> wrote:

> i am fresh student that learning v8 and nodejs source code, today i am
> learning v8 docs step by step, i know v8 have built in d8 *that can
> directly run javascript file*, but i don't know *why we still need nodejs
> run javascript file.*
>
> --
> --
> v8-dev mailing list
> [email protected]
> http://groups.google.com/group/v8-dev
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/v8-dev/62dcd603-069a-46bc-98d3-615aa9b16596n%40googlegroups.com
> <https://groups.google.com/d/msgid/v8-dev/62dcd603-069a-46bc-98d3-615aa9b16596n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/CAGRskv95gUfRuZ65_mFbnCO_tCeU_vQbrpYfeUrS8d_TWOPAUA%40mail.gmail.com.

Reply via email to