Giter Club home page Giter Club logo

rustboot's Introduction

rustboot

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:

Setup

You need a few things to run rustboot:

  1. qemu
  2. a cross-compiler for i386
  3. nasm
  4. Rust's incoming branch.

OSX

To set things up on OSX, do this:

Install nasm and qemu from homebrew:

$ brew install nasm
$ brew install quemu

Install 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 'ftp://sourceware.org/pub/binutils/snapshots/binutils-2.23.52.tar.bz2'
$ ./configure --target=i386-elf --prefix=/Users/steve
$ make && make install

To get edge Rust going, grab it from git:

$ git clone https://github.com/mozilla/rust
$ cd rust
$ git checkout incoming
$ ./configure --prefix=/Users/steve
$ make && make install

Same thing about the prefix applies.

Then, just make sure that ~/bin is in your PATH, if you're using a prefix.

Running it

To compile, simply

$ make

To run,

$ make run

rustboot's People

Contributors

bouk avatar steveklabnik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.