Skip to content

JavaScript library operating system for the cloud

License

Apache-2.0 and 2 other licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE.commentasm
Unknown
LICENSE.commentcc
Notifications You must be signed in to change notification settings

FailedSleep/runtime

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

runtime.js

Build Status npm Gem Travis

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.

Example index.js:

var runtime = require('runtimejs')
console.log('Hello world!')

Let's bundle up and run it!

# install dependencies
npm install runtimejs
npm install runtimeify -g
npm install runtime-tools -g

# bundle up ramdisk image
runtimeify index.js -o initrd

# make sure you have QEMU installed
brew install qemu           # OSX
sudo apt-get install qemu   # Ubuntu

# run it in QEMU
runtime-qemu ./initrd

WARNING: project is in development and not ready for production use. Contributions are welcome.

How does it work?

There are two main components: operating system (OS) kernel and a core JavaScript library.

The kernel is the C++ program that manages low-level resources like CPU and memory, runs applications using embedded V8 JavaScript engine, and exposes raw hardware to JavaScript.

Application, its dependencies and the core library are bundled up using Browserify, then packed into ramdisk image for kernel to use.

runtime.js is a library operating system, because application uses it as its own dependency (library). Internal architecture is similar to exokernels, where system exposes the hardware to application code and forces as few abstractions as possible.

Docs

API docs

Blog post: runtime.js — JavaScript library OS

License

Apache License, Version 2.0

About

JavaScript library operating system for the cloud

Resources

License

Apache-2.0 and 2 other licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE.commentasm
Unknown
LICENSE.commentcc

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 79.7%
  • JavaScript 18.9%
  • Assembly 1.1%
  • Other 0.3%