stardust-oxide
                                
                                
                                
                                    stardust-oxide copied to clipboard
                            
                            
                            
                        Rust-based Unikernel

stardust-oxide
Features
- [x] Console driver with log support
 - [x] Page frame mapping and table generation (using buddy_system_allocator as global allocator)
 - [x] Grant table creation/destruction
 - [x] XenStore interface
 - [x] XenBus interface
 - [x] Simple async executor
 - [x] Network driver using smoltcp for TCP/IP stack
 
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.