adds code


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: https://linkedin.com/in/erickwendel ▸ Blog: https://erickwendel.com.br/ ▸ Facebook: https://fb.com/page.erickwendel ▸ Medium: https://medium.com/@erickwendel ▸ Twitter: https://twitter.com/erickwendel_ ✅ LINKS ▸ https://simonfree.tumblr.com/post/31041084834/embedding-javascriptcore-part-1 ▸ https://reactnative.dev/docs/javascript-environment ▸ https://medium.com/swlh/console-log-isnt-in-the-javascript-language-2b0f24d57397 ▸ V8 Multithread: https://gist.github.com/ngot/4e363c08c1a912f3f10fda882a9e3956 ▸ Is Node.js considered multithreading with worker threads?: https://stackoverflow.com/a/63225073/4087199 ▸ https://gist.github.com/petermunro/735830c16cf1ddc274de ▸ https://gist.github.com/petermunro/14668fb9020398b77bf5 ▸ https://joyeecheung.github.io/blog/2021/08/27/binding-v8-on-an-m1-macbook/ ▸ https://github.com/danbev/learning-libuv.git ▸ https://nikhilm.github.io/uvbook/basics.html ▸ https://medium.com/dkatalis/nodejs-architecture-relationship-between-libuv-v8-and-js-7dce74cf1c51 ▸ https://v8.dev/docs/d8 ▸ https://gist.github.com/kevincennis/0cd2138c78a07412ef21 ▸ https://github.com/andreburgaud/docker-v8 ▸ Lemon - https://www.youtube.com/watch?v=5fWIf2A6Z_s ▸ Building a JavaScript Runtime dotJS - https://youtu.be/0XZEaaAqjCA ▸ Native Script - https://youtu.be/wz7Znu6tqFw ▸ multi uvs - https://github.com/kristrev/libuv-multiple-loops/blob/master/libuv-test.c ▸ 8ttpd - https://github.com/manuel/8ttpd ▸ http with libevent - https://gist.github.com/krikulis/793194 ▸ https://stackoverflow.com/questions/49811043/relationship-between-event-loop-libuv-and-v8-engine ▸ https://codeahoy.com/learn/libuv/ch1/#how-to-install-libvu + callbacks ▸ https://www.reddit.com/r/node/comments/cluorc/comment/evyk21d/?utm_source=share&utm_medium=web2x&context=3 ▸ https://www.reddit.com/r/node/comments/cluorc/what_are_the_differences_between_nodes_event_loop/ ▸ https://github.com/nodejs/help/issues/3124 ▸ https://stackoverflow.com/questions/9433864/whats-the-difference-between-libev-and-libevent ✅ 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!
Previous Post Next Post