includeOS

Run your application with zero overhead

IncludeOS allows you to run your application in the cloud without an operating system. IncludeOS adds operating system functionality to your application allowing you to create performant, secure and resource efficient virtual machines.

IncludeOS applications boot in tens of milliseconds and require only a few megabytes of disk and memory.

includeOS

Performant. No operating system overhead.

includeOS

Perfectly portable. Runs on all major hypervisors.

includeOS

Secure. No unused code in your image.

includeOS

Lean. Base virtual image starts at about 1 megabyte.

Get started

Installing IncludeOS on Linux or macOS typically takes around 10 minutes. Once installed we suggest looking at and booting a few of the examples to familarize yourself with the system.

git clone "https://github.com/hioa-cs/IncludeOS.git"
cd IncludeOS
export INCLUDEOS_PREFIX=~/IncludeOS_install
./install.sh

For detailed instructions see get started. Once installed have a look in IncludeOS/examples/demo_service. In order to boot the application just type "sudo boot --create-bridge ." and the application should build and run.

We strive to make it easy to create fast and useful services. The below code will set up a simple TCP echo service and happily talk to anyone connecting.

#include <os>
#include <iostream>
#include <net/inet4>

void Service::start()
{
  // Get the IP stack thats already been automatically configured
  auto& inet = net::Super_stack::get<net::IP4>(0);
  // Setup a TCP echo server on port 7 (echo port)
  auto& server = inet.tcp().listen(7); 

  server.on_connect([] (auto conn) {
    // Log incomming connections on the console:
    std::cout << "Connection " << conn->to_string() << " established\n";
    // When data is received, echo back
    conn->on_read(1024, [conn] (auto buf) {
      conn->write(buf);
    });
  });
}
The network configuration of the virtual machine can reside in a JSON file, named config.json, placed in the same folder. It should look something like this, depending on your need:
{
  "net" : [
    {
      "iface": 0,
      "config": "dhcp-with-fallback",
      "address": "10.0.0.42",
      "netmask": "255.255.255.0",
      "gateway": "10.0.0.1"
    }
  ]
}