Recreating Node.js from Scratch

Have you ever thought about how Node.js was built back in 2009? Do you know how the Chrome JavaScript Engine V8 works alongside the powerful cross-platform asynchronous I/O Libuv? Or going even further, have you noticed how many JavaScript runtimes such as Bun, Deno, or Cloudflare Workers are going hype nowadays? Is it that easy to build a JavaScript runtime from Scratch? Well, let's find out! Today! You're going to build a complete JavaScript runtime that recreates how the Node.js system works by writing custom functions, integrating C++ functions, and using even threads. Ah, and I brought surprises for you. I've prepared a complete cloud environment for you to develop new features for your JavaScript runtime without having to set up a C++ environment or compile the V8 and libuv libraries. ✅ SOURCE CODE 👉🏻 https://bit.ly/ew-myownnode-tutorial 👉🏻 GitPod env: https://bit.ly/gitpod-myownnode 👉🏻 Node.js Streams Course: https://www.nodejsstreams.com/ ✅ FOLLOW ME ▸ Linkedin:   / erickwendel   ▸ Blog: https://erickwendel.com.br/ ▸ Facebook: https://fb.com/page.erickwendel ▸ Medium:   / erickwendel   ▸ Twitter:   / erickwendel_   ✅ LINKS ▸ https://simonfree.tumblr.com/post/310... ▸ https://reactnative.dev/docs/javascri... ▸   / console-log-isnt-in-the-javascript-language   ▸ V8 Multithread: https://gist.github.com/ngot/4e363c08... ▸ Is Node.js considered multithreading with worker threads?: https://stackoverflow.com/a/63225073/... ▸ https://gist.github.com/petermunro/73... ▸ https://gist.github.com/petermunro/14... ▸ https://joyeecheung.github.io/blog/20... ▸ https://github.com/danbev/learning-li... ▸ https://nikhilm.github.io/uvbook/basi... ▸   / nodejs-architecture-relationship-between-l...   ▸ https://v8.dev/docs/d8https://gist.github.com/kevincennis/0... ▸ https://github.com/andreburgaud/docke... ▸ Lemon -    • C++ Tutorial - Write Your Own Javascript R...   ▸ Building a JavaScript Runtime dotJS -    • Video   ▸ Native Script -    • Embedding V8 in the real world by Stanimir...   ▸ multi uvs - https://github.com/kristrev/libuv-mul... ▸ 8ttpd - https://github.com/manuel/8ttpd ▸ http with libevent - https://gist.github.com/krikulis/793194https://stackoverflow.com/questions/4... ▸ https://codeahoy.com/learn/libuv/ch1/... + callbacks ▸ https://www.reddit.com/r/node/comment... ▸   / what_are_the_differences_between_nodes_eve...   ▸ https://github.com/nodejs/help/issues... ▸ https://stackoverflow.com/questions/9... ✅ TIMELINE 00:00:00 - SUBSCRIBE NOW 00:02:44 - Free content about Node.js and JavaScript 00:03:24 - About video content 00:04:45 - How to create a Javascript compiler? 00:10:21 - What is Node.js? 00:14:20 - Summarizing the Node.js System: V8, Libuv, and C++ layer 00:16:08 - About JavaScript Promises 00:17:29 - about node.js streams training course 00:17:42 - What are the Node.js system's three main components? 00:21:17 - About CapivaraBR 00:21:22 - Starting demo: accessing the Gitpod environment 00:22:50 - Testing project 00:23:46 - Understanding the start file 00:25:45 - Check and run the examples files 00:30:37 - The v8 headers 00:31:35 - About the makefile 00:32:22 - Checking the template code 00:34:36 - Understanding the context: implementation and lifecycle 00:38:45 - Trying out our template creating a simple for loop 00:39:43 - Implementing a timeout function 00:41:57 - Creating the timer class 00:46:34 - Get arguments using isolate, context, and parameters 00:51:44 - Implementing a callback to timeout function 00:53:15 - Create a struct to share data through callbacks 00:53:48 - Instantiate timer function 00:55:45 - Testing changes 00:56:45 - Storing the function to use in the callback function 01:01:34 - Retrieving data and calling back the js function 01:05:29 - Grabbing results from the callback and putting them on a variable 01:10:06 - are Promises just wrappers for callbacks? 01:13:20 - Creating a libuv thread 01:20:55 - Advanced examples 01:22:50 - Final considerations 01:24:27 - Blooper reel 01:25:26 - Thank you! #JavaScriptRuntime #V8 #Libuv #Nodejs #Deno #WebDevelopment #FrontendDevelopment #BackEndDevelopment #ErickWendel #SoftwareDevelopment #CodeNewbie #ProgrammingTips #TechTips #DeveloperCommunity #OpenSource #CodeChallenge #CodeMentor #CodingLife #TechBlog #LearnToCode #CodeLikeAPro #CodeOptimization #CodeEfficiency #CodePerformance #CodeDebugging #CodeReview #CodeRefactoring #CodeQuality #WebApps #WebDevelopmentTools

Implementing the WebSocket Protocol with JavaScript  || Crash Course || Erick Wendel
▶︎

Implementing the WebSocket Protocol with JavaScript || Crash Course || Erick Wendel

Node.js: The Documentary | An origin story
▶︎

Node.js: The Documentary | An origin story

How 1999 Quake 3 Teaches Elite Software Engineering
▶︎

How 1999 Quake 3 Teaches Elite Software Engineering

Jfrog | Jfrog Artifactory | Jfrog Artifactory Tutorial | Artifactory Tutorial | Intellipaat
▶︎

Jfrog | Jfrog Artifactory | Jfrog Artifactory Tutorial | Artifactory Tutorial | Intellipaat

The State of AI Coding Is Honestly Terrifying
▶︎

The State of AI Coding Is Honestly Terrifying

Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup
▶︎

Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup

Nobody Explained the Schrödinger Equation Like THIS!
▶︎

Nobody Explained the Schrödinger Equation Like THIS!

Casey Muratori – The Big OOPs: Anatomy of a Thirty-five-year Mistake – BSC 2025
▶︎

Casey Muratori – The Big OOPs: Anatomy of a Thirty-five-year Mistake – BSC 2025

Creator of OCaml: Functional Programming, Formal Verification, Programming Languages | Xavier Leroy
▶︎

Creator of OCaml: Functional Programming, Formal Verification, Programming Languages | Xavier Leroy

Code Isn't Free — Mario Zechner on the Hard Truths of Coding With AI (creator of Pi)
▶︎

Code Isn't Free — Mario Zechner on the Hard Truths of Coding With AI (creator of Pi)

Introduction to libuv: What's a Unicorn Velociraptor? - Colin Ihrig, Joyent
▶︎

Introduction to libuv: What's a Unicorn Velociraptor? - Colin Ihrig, Joyent

The Great Bun Rewrite
▶︎

The Great Bun Rewrite

How to make 3D Games in Godot
▶︎

How to make 3D Games in Godot

CHOSEN ONE!! YOUR IDENTITY REVEAL JUST SHOOK THE INTERNET... AND THEIR MINDS
▶︎

CHOSEN ONE!! YOUR IDENTITY REVEAL JUST SHOOK THE INTERNET... AND THEIR MINDS

I Bought And Restored "Old" Technology To Prove The Economy Is Imploding
▶︎

I Bought And Restored "Old" Technology To Prove The Economy Is Imploding

What is SonarQube | Introduction SonarQube | SonarQube Tutorial | SonarQube Basics | Intellipaat
▶︎

What is SonarQube | Introduction SonarQube | SonarQube Tutorial | SonarQube Basics | Intellipaat

GPT-6 was asked a question, and went on a hacking spree to get the answer
▶︎

GPT-6 was asked a question, and went on a hacking spree to get the answer

Live || Debunking the myth of single-threaded Node.js in practice || Erick Wendel
▶︎

Live || Debunking the myth of single-threaded Node.js in practice || Erick Wendel

Jake Archibald on the web browser event loop, setTimeout, micro tasks, requestAnimationFrame, ...
▶︎

Jake Archibald on the web browser event loop, setTimeout, micro tasks, requestAnimationFrame, ...

How Rockstar fit an entire city into PlayStation 2 memory
▶︎

How Rockstar fit an entire city into PlayStation 2 memory