Linked by Thom Holwerda on Sun 26th May 2013 18:48 UTC
OSNews, Generic OSes "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."
Thread beginning with comment 562950
To read all comments associated with this story, please click here.
I have never used rust,,,
by Coxy on Mon 27th May 2013 16:24 UTC
Coxy
Member since:
2006-07-01

...but maybe someone can explain to me how this code

https://github.com/charliesome/rustboot/blob/master/main.rs

constitutes an operating system?

Reply Score: 3

RE: I have never used rust,,,
by umccullough on Mon 27th May 2013 16:35 in reply to "I have never used rust,,,"
umccullough Member since:
2006-01-26

...but maybe someone can explain to me how this code

https://github.com/charliesome/rustboot/blob/master/main.rs

constitutes an operating system?


Well, looks like there's a few asm files there that basically bootstrap an environment that can load/run the rust runtime - at which point the contents of the .rs files are executed.

It's really not an operating system so much as it's proof that you can boot directly into a rust runtime environment without another OS... whether that rust runtime can then actually utilize all the hardware present on the machine is perhaps a more important question.

I know nothing about Rust... so <shrug>

Reply Parent Score: 3

RE: I have never used rust,,,
by jayrulez on Mon 27th May 2013 16:37 in reply to "I have never used rust,,,"
jayrulez Member since:
2011-10-17

I checked the Github page. Nowhere did it say that it is an operating system.

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:

Reply Parent Score: 2

RE: I have never used rust,,,
by butters on Mon 27th May 2013 20:17 in reply to "I have never used rust,,,"
butters Member since:
2005-07-08

Think of that as the init process, the only "userspace" component of this project. Instead of forking new processes to run system services like a real OS, it just paints the framebuffer red.

The actual "kernel" is defined in runtime.asm, where you can see the syscalls declared, although the only even remotely meaty part of this project is loader.asm, which loads a rust executable into a virtual address space.

Reply Parent Score: 3