runtime.js is an open-source library operating system for the cloud that runs JavaScript, could be bundled up with an application and deployed as a lightweight and immutable VM image.
It's built on V8 JavaScript engine and uses event-driven and non-blocking I/O model inspired by Node.js. At the moment KVM is the only supported hypervisor.
First thing is the command line tool runtime-cli
, it will add runtime
command to the shell. Type runtime
to get full usage help.
npm install runtime-cli -g
Make sure QEMU VM is installed, so you can test/debug applications locally.
brew install qemu # OSX
sudo apt-get install qemu # Ubuntu
Create new project and add index.js
entry point file:
mkdir project
cd project
npm init
npm install runtimejs --save
echo "console.log('ok')" > index.js
Run project locally in the QEMU VM:
runtime start
Or let it watch directory for changes and restart QEMU automatically:
runtime watch
WARNING: runtime.js is in development and not ready for production use. Contributions are welcome.
There are two main components: operating system kernel and a JavaScript library.
The kernel is written in C++ and manages low-level resources like CPU and memory and runs JavaScript code using embedded V8 JavaScript engine.
Apache License, Version 2.0