Skip to content

Build and use highly customized and ultra-lightweight unikernel VMs.

License

Notifications You must be signed in to change notification settings

LucaSeri/kraftkit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KraftKit 🚀🐒🧰

Go Report Card Latest release

KraftKit provides a suite of tools and Go-based framework for building custom, minimal, immutable lightweight unikernel virtual machines based on Unikraft: a fast, secure and open-source library operating system.

With KraftKit, you can easily leverage Unikraft and manage specialized, high-performance applications at every stage of their lifecycle: from construction to production.

There are many benefits in running your application as a unikernel: for more information about the performance of unikernels 🚀, the added security 🔒 and a positive impact on the environment 🌱 please check out Unikraft's documentation and the introductory chapters on these impacts

Features

  • 🔥 Native Firecracker MicroVM support;
  • 📚 Pre-built unikernel app catalog;
  • 🤹‍♀️ Daemonless unikernel VM instance manager;
  • 📦 OCI packaging and distribution support;
  • 🚜 ELF binary / POSIX-compatibility support;
  • 🧰 Go SDK for building unikernels programmatically; and
  • 🚀 much more!

Installation

You can quickly and easily install KraftKit using the interactive installer. Simply run the following command to get started:

curl --proto '=https' --tlsv1.2 -sSf https://get.kraftkit.sh | sh

Alternatively, you can download the binaries from the releases pages.

See additional installation instructions.

See also the hacking documentation on how to build KraftKit from source.

Container build environment

KraftKit ships a container build environment which you can use instead of installing any dependencies directly on your host. It includes the kraft binary as well as all the additional tools and libraries for building Unikraft unikernels. Simply attach a working directory on your host as a mount path volume mapped to /workspace, e.g.:

docker run -it --rm -v $(pwd):/workspace --entrypoint bash kraftkit.sh/base:latest

The above command will drop you into a container shell. Simply type exit or Ctrl+D to quit.

Quickstart

Running unikernels with kraft is designed to be simple and familiar. To test your installation of kraft, you can run the following:

kraft run unikraft.org/helloworld:latest

Building unikernels is also designed to be simple. You can find some common project examples below:

Example
Simple "Hello, world!" application written in C
Simple "Hello, world!" application written in C++
Simple "Hello, world!" application written in Rust built via cargo
Simple NodeJS 18 HTTP Web Server with http
Simple Go 1.21 HTTP Web Server with net/http
Simple Flask 3.0 HTTP Web Server
Simple Python 3.10 HTTP Web Server with http.server.HTTPServer

Find more examples and applications in our community catalog!

Use in GitHub Actions

KraftKit can be used to automatically build your application into a unikernel in a GitHub Actions workflow, simply use unikraft/kraftkit@staging.

In the following example, a repository that has been initialized with a top-level Kraftfile that contains a target for qemu/x86_64 will be built every time a PR is opened, synchronized or re-opened:

name: example

on:
  pull_request:
    types: [opened, synchronize, reopened]

jobs:
  build:
    steps:
    - uses: actions/checkout@v4

    - uses: unikraft/kraftkit@staging
      with:
        workdir: .
        kraftfile: Kraftfile
        arch: x86_64
        plat: qemu

For other CI's and integrations, including GitLab, check out the getting started guide.

Support, Community & Meetings

If you have any further questions or need more information about KraftKit or Unikraft, please refer to the official Unikraft documentation or ask for help on the Unikraft community forum.

A KraftKit Working Group (WG) meets every other Wednesday at 13:00 PM (CET) on Discord. Invites and additional details are available on the Unikraft OSS Public calendar.

License

KraftKit is part of the Unikraft OSS Project and licensed under BSD-3-Clause.

About

Build and use highly customized and ultra-lightweight unikernel VMs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 96.3%
  • Shell 2.4%
  • Other 1.3%