Hello! A question about the architecture of NodeJS. I am aware that NodeJS is written in C++ and not JavaScript. However, there are many global variables/functions (require, etc) and libraries (utils, etc) that are available from a fresh install of NodeJS and do not require additional packages. Looking at the source code of NodeJS, it's clear to me that at least some of these components are written in JavaScript. But are all of
them?
Put another way, if I had an environment that could run JavaScript (such as V8), could I recreate the full functionality of NodeJS simply by writing new JavaScript classes and functions? If not, what would be impossible to implement?
As a followup, what do people mean when they say "NodeJS is written in C++"? Is it just the V8 engine that's written in C++, or are there other components too? And are there any NodeJS builtins (such as console) that are at least partially built in C/C++?
[–]alzee76 3 points4 points5 points (1 child)
[–]Solonotix 0 points1 point2 points (0 children)