MCPcopy Create free account
hub / github.com/ErickWendel/myownnode

github.com/ErickWendel/myownnode @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
3,399 symbols 4,300 edges 260 files 564 documented · 17% updated 3y ago★ 338

Browse by type

Functions 1,844 Types & classes 1,555
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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

Core symbols most depended-on inside this repo

Shape

Class 1,341
Method 992
Function 852
Enum 214

Languages

C++99%
TypeScript1%

Modules by API surface

recorded/capivara/v8/include/v8-util.h86 symbols
preclass/capivara/v8/include/v8-util.h86 symbols
recorded/capivara/v8/include/v8-platform.h78 symbols
preclass/capivara/v8/include/v8-platform.h78 symbols
recorded/capivara/v8/include/v8-fast-api-calls.h69 symbols
preclass/capivara/v8/include/v8-fast-api-calls.h69 symbols
recorded/capivara/v8/include/v8-forward.h61 symbols
preclass/capivara/v8/include/v8-forward.h61 symbols
recorded/capivara/v8/include/v8-inspector.h56 symbols
preclass/capivara/v8/include/v8-inspector.h56 symbols
recorded/capivara/v8/include/v8-profiler.h54 symbols
recorded/capivara/libuv/include/uv.h54 symbols

For agents

$ claude mcp add myownnode \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page