Skip to content
프로젝트

소개

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

프로그래밍 언어 및 런타임

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
-1
in 15 days
-1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

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

관련 프로젝트 살펴보기

불러오는 중…