Suggest an editImprove this articleRefine the answer for “What is the Node.js runtime made of?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)The **Node.js runtime** is made of the **V8** engine (runs JS), the **libuv** library (event loop, thread pool, async I/O), C++ bindings between them, built-in core modules (`fs`, `http`, `net`, ...) and the CLI/REPL shell that starts everything. **Key point:** V8 runs the code, libuv provides asynchrony and I/O, and bindings connect the JS world to the native one.Shown above the full answer for quick recall.Answer (EN)ImageMore details in the official Node.js docs - [About Node.js](https://nodejs.org/en/about) ### 1. V8 Engine (the JavaScript engine) - The same engine used in Google Chrome. - It compiles JavaScript into machine code (JIT, Just-In-Time compilation). - It is responsible for: - interpreting and running JS code; - memory management (garbage collection); - optimizing code at runtime. V8 is exactly what lets Node.js run JavaScript directly, without a browser. ### 2. libuv (asynchrony and I/O) - A C library that provides: - the **Event Loop**, the main event cycle; - a **Thread Pool** for background tasks; - non-blocking input/output (I/O); - work with the filesystem, network sockets and timers. - Thanks to libuv, Node.js can handle many requests at once without blocking. ### 3. Bindings (C++ Bindings) - A "bridge" between the JS world (V8) and native code (libuv, system libraries). - Node.js uses **Node bindings** to call functions written in C/C++ from JavaScript. - For example, when you call `fs.readFile()`, under the hood it reaches the operating system's syscalls through bindings. ### 4. Core Modules (Node.js's built-in modules) - Implemented on top of V8 and libuv, and include: - `fs` (filesystem); - `http`, `https`; - `net`, `dns`; - `path`, `url`, `stream`, `events`, and others. - These modules are the part of the Node.js API written in C++ and JavaScript so developers can work at a high level. ### 5. Event Loop - The heart of Node.js's asynchronous model. - An infinite loop that: 1. pulls tasks from queues (timers, I/O, callbacks, and so on); 2. distributes them across phases; 3. runs them in priority order. - The Event Loop is driven by the libuv library. ### 6. Thread Pool - Inside libuv there is a pool of 4 threads (by default). - It runs heavy operations that don't depend on the main Event Loop thread, for example file operations, DNS, cryptography. ### 7. C/C++ Core and the Node API - Node.js's low-level parts, written in C/C++, handle: - initializing the environment; - memory management; - interacting with the OS; - supporting `process`, `Buffer`, `streams`, and others. ### 8. The Node.js CLI and REPL - The shell that runs your code (`node script.js`). - Supports REPL (interactive command execution). - Initializes the runtime, wiring up V8, libuv and the core modules. ### The short structure: ```javascript ┌────────────────────────┐ │ Node.js CLI / REPL │ └────────────┬───────────┘ ▼ ┌────────────────────────┐ │ Node.js Core (C++) │ │ (Bindings, Buffer, API) │ └────────────┬───────────┘ ▼ ┌────────────────────────┐ │ libuv (I/O) │ │ Event Loop, Threads │ └────────────┬───────────┘ ▼ ┌────────────────────────┐ │ V8 Engine (JS) │ └────────────────────────┘ ```For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.