rustos

![drone] ![crate] ![docs]

Philipp Oppermann's awesome [Writing an OS in Rust]

Examples

Current [main.rs]:

```rust

![no_std]

![no_main]

![feature(customtestframeworks)]

![testrunner(rustos::testrunner)]

![reexporttestharnessmain = "testmain"]

extern crate rustos; extern crate x86_64; use core::panic::PanicInfo; use rustos::println;

[no_mangle]

pub extern "C" fn start() -> ! { println!("Welcome to the real world!"); rustos::init(); use x8664::registers::control::Cr3; let (level4pagetable, _) = Cr3::read(); println!("Level 4 page table at: {:?}", level4pagetable); #[cfg(test)] testmain(); println!("It did not crash!!!"); rustos::hltloop(); }

[cfg(not(test))]

[panic_handler]

fn panic(info: &PanicInfo) -> ! { println!("{}", info); rustos::hlt_loop(); }

[cfg(test)]

[panic_handler]

fn panic(info: &PanicInfo) -> ! { rustos::testpanichandler(info) } ```

Happy Hackin'!