GithubHelp home page GithubHelp logo

erickwendel / myownnode Goto Github PK

View Code? Open in Web Editor NEW
259.0 7.0 33.0 26.62 MB

Bun? Deno? Node.js? Creating your own JavaScript Runtime using V8, Libuv and more

Home Page: https://youtu.be/ynNDmp7hBdo

C++ 79.00% C 20.50% Makefile 0.06% Python 0.05% Shell 0.25% JavaScript 0.16%
libuv v8 bun deno diy js tutorial v8-javascript-engine

myownnode's Introduction

CapivaraBR - Creating your own JavaScript runtime tutorial

capivara logo

Overview

CapivaraBR is a JavaScript runtime built on top of V8 Javascript Engine and Libuv

About

Welcome, this repo is part of my youtube video about Recreating the Node.js project from Scratch using V8, Libuv and C++

First of all, leave your star ๐ŸŒŸ on this repo.

Access our exclusive telegram channel so I'll let you know about all the content I've been producing

Running

  • In the GitPod env you can run the hello world example by running the executable ./start.sh script.

Notes

  • It comes with live reload enabled for C++ and JS files using nodemon

  • It comes with a simple Print function, a custom C++ function used as a console.log function

  • The ./start.sh script generates a binary called capivara.

    • It works similarly to how Node.js works.
      • By running capivara index.js it will read the JavaScript content from the file and use V8 to interpret it nd libuv to wait for async events.
  • Project uses V8 v10.7.0

  • Project uses Libuv v1.x

  • All other dependencies are listed on scripts folder.

Examples

I left some file exmaples on examples folder in case you wanna check out how to create uv timers, uv threads, native cpp threads or the v8 custom print function.

Running the examples

  • You can compile and execute examples by simply executing
make example-without-extension

For example executing the v8-print-hello.cpp:

make v8-print-hello
# Hello, World!...

Compiling binaries for other platforms

if you wanna compile binaries it by yourself, I left some scripts in case you wanna compile all binaries by yourself

Author

myownnode's People

Contributors

digaoramos avatar erickwendel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.