krzysz00/rust-kernel


A toy kernel in rust

License: MIT

Language: Rust


Building

You need a copy of the rust sources to cross-compile libcore and similar for the "new architecture" We have to do that because rustc doesn't have a -m32. These sources need to be the same (or close to), the sources used to build your rustc (see the commit hash in rustc --version).

The Makefile looks for these sources at deps/rust , but you can override that with make RUSTSRC=directory

The build is -O3 by default, but you can edit the Makefile to change that. (Note, when debugging, you probably want -O1, since, with rustc -O0 is "pessimized")

Run this by loading kernel/kernel.img and user/user.img into qemu The kernel should be the first hard drive (hda). The user program should be provided as the second hard drive (hdb).

Rust version

The current recommended compiler/sources are 1.2 beta sources and nightly >= 2015-06-24

This code uses some unstable features (like inline assembly). To use unstable features, you need a nightly build of the compiler. Since tracking the nightly branch might be a bad idea, you can use rustup.sh --channel=nightly --date=[date-of-relevant-beta-release] to get as close to the beta build as possible. When you do that, make sure to check out the corresponding source code. (rustup.sh, which is Rust's installer script, also takes a --prefix option).

Project Statistics

Sourcerank 4
Repository Size 120 KB
Stars 8
Forks 1
Watchers 1
Open issues 1
Dependencies 0
Contributors 1
Tags 0
Created
Last updated
Last pushed

Top Contributors See all

Krzysztof Drewniak

Something wrong with this page? Make a suggestion

Last synced: 2016-05-27 14:08:50 UTC

Login to resync this repository