Skip to content

doodlewind/minimal-js-runtime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimal JS Runtime

A toy JavaScript runtime based on QuickJS and libuv.

Introduction

This project demonstrates how to build a simplest JavaScript runtime with QuickJS and libuv. Takeaway points include:

  • Native fib function implementation.
  • setTimeout implementation.
  • Support for running microtasks and macrotasks.

See my Chinese blog post for technical details:

Getting Started

Please make sure CMake, QuickJS and libuv are globally installed.

Build the runtime:

cd build
cmake .. && make

Start the runtime:

./runtime

Misc

To find out how to port the original event loop shipped with QuickJS, checkout commit fce26e.

License

MIT

About

A toy JavaScript runtime based on QuickJS and libuv.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published