A toy JavaScript runtime based on QuickJS and libuv.
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:
Please make sure CMake, QuickJS and libuv are globally installed.
Build the runtime:
cd build
cmake .. && make
Start the runtime:
./runtime
To find out how to port the original event loop shipped with QuickJS, checkout commit fce26e.
MIT