A tiny 32 bit kernel written in Rust.
I was inspired to download Rust and try to do this after seeing zero.rs - a stub that lets Rust programs run almost freestanding.
It paints the screen bright red and then hangs. That's it:
You need a few things to run rustboot:
qemu- a cross-compiler for i386
nasm- Rust's
masterbranch or 0.7 release.
To set things up on OSX, do this:
Install nasm and qemu from homebrew:
$ brew install nasm
$ brew install qemuMake sure the brew version of nasm is being used:
$ nasm -v
NASM version 2.11.02 compiled on Apr 14 2014Install binutils from source.
I personally keep things I manually compile limited to my home directory, so
I use the --prefix=/Users/steve option. Put this wherever you want, of
course.
$ wget http://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.gz
$ tar xf binutils-2.24.tar.gz
$ cd binutils-2.24
$ ./configure --target=i386-elf --disable-werror --prefix=/Users/steve
$ make && make installTo get edge Rust going, grab it from git:
$ git clone https://github.com/mozilla/rust
$ cd rust
$ ./configure --prefix=/Users/steve
$ make && make installSame thing about the prefix applies.
Then, just make sure that ~/bin is in your PATH, if you're using a prefix.
To compile, simply
$ makeTo run,
$ make run