GithubHelp home page GithubHelp logo

decagondev / simple-os Goto Github PK

View Code? Open in Web Editor NEW

This project forked from seanchen1991/simple-os

2.0 2.0 0.0 12 KB

A freestanding Rust binary upon which OS abstractions can be built on top of.

Rust 100.00%

simple-os's Introduction

Simple OS

A freestanding Rust binary upon which OS abstractions can be built on top of.

Initial Setup

  1. Make sure that you're running the nightly version of the Rust compiler. If you're unsure if you have rustup installed or not, you can install it from here. Once that's done, run rustup toolchain install nightly to install the nightly toolchain, then switch to it by running rustup default nightly.
  2. Fork the repo, then clone it onto your local machine.
  3. Download and install QEMU, which is the virtual environment we'll be running our OS in (you may need to add it to your path). You can check that QEMU was correctly installed by running qemu-system-x86_64 and making sure an empty window QEMU window pops up.
  4. cd into the root of the simple-os project.
  5. We'll need to add Rust's core and compiler_builtins libraries locally. Do this by running rustup component add rust-src.
  6. We'll need to install some additional prerequisites through cargo, namely the bootimage and llvm-tools-preview dependencies. You can add these by running cargo install bootimage and rustup component add llvm-tools-preview.
  7. Run cargo build to see if everything compiles without issue.
  8. Run cargo run. If everything is working correctly, a QEMU window should pop up with "Hello World!" printed inside of it.
  9. Run cargo test. The output should include, among other things, five passing tests that look like the following:
simple_os::vga_buffer::test_println_simple...   [ok]
simple_os::vga_buffer::test_println_many...   [ok]
simple_os::vga_buffer::test_println_output...   [ok]
simple_os::vga_buffer::test_println...   [ok]
should_panic::should_fail...   [ok]

If you see these statements in your cargo test output, then everything worked, and you should be good to go! If you see something different, reach out and let me know so we can look into it.

simple-os's People

Contributors

decagondev avatar seanchen1991 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.