• This repository has been archived on 23/Jan/2024
  • Stars
    star
    122
  • Rank 292,031 (Top 6 %)
  • Language
    Rust
  • License
    Mozilla Public Li...
  • Created over 3 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Rust-based Unikernel

Screenshot 2021-05-26 at 14 34 13

stardust-oxide

CI LoC

Features

  • Console driver with log support
  • Page frame mapping and table generation (using buddy_system_allocator as global allocator)
  • Grant table creation/destruction
  • XenStore interface
  • XenBus interface
  • Simple async executor
  • Network driver using smoltcp for TCP/IP stack

Screenshot 2022-03-09 at 12 15 38

Usage

Requirements

Building and running stardust-oxide requires:

  • Rust toolchain (latest nightly)
  • C compiler
  • Xen hypervisor and associated headers

The recommended way to install Rust is with rustup. The rust-toolchain file in the repository root will ensure the correct toolchain version is installed and used (therefore the toolchain and components selected during installation do not matter).

The required packages can be installed on Ubuntu with:

$ sudo apt install -y clang xen-system-amd64 libxen-dev

The host machine must be restarted to boot into the hypervisor with the original Debian/Ubuntu installation now running as the Domain 0 virtual machine.

Building

Executing cargo build in the repository root will build all three crates including the stardust kernel binary.

Running

Executing cargo run will call the run.sh script which generates the configuration for the Xen virtual machine then uses xl to start it.

Structure

This project is a Cargo workspace consisting of three crates.

stardust

Main crate that produces a kernel binary and contains the start_kernel entrypoint function.

xen

Contains safe interfaces to the xen-sys that could be used to write any guest Xen kernel.

xen-sys

Contains Rust bindings to the Xen C headers using bindgen.