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 562949
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[3]: Comment by BBAP
by Vanders on Mon 27th May 2013 16:07 UTC in reply to "RE[2]: Comment by BBAP"
Vanders
Member since:
2005-07-06

another OS done in safe systems programming languages.

The irony being that two of the three functions in main.rs are marked unsafe.

Reply Parent Score: 2

RE[4]: Comment by BBAP
by moondevil on Mon 27th May 2013 17:04 in reply to "RE[3]: Comment by BBAP"
moondevil Member since:
2005-07-08

"another OS done in safe systems programming languages.

The irony being that two of the three functions in main.rs are marked unsafe.
"

Thanks to them being marked unsafe, it is easy to locate and validate what the code is allowed to do.

In C every line in the source code is unsafe.

Reply Parent Score: 2

RE[5]: Comment by BBAP
by kwan_e on Tue 28th May 2013 01:44 in reply to "RE[4]: Comment by BBAP"
kwan_e Member since:
2007-02-18

"[q]another OS done in safe systems programming languages.

The irony being that two of the three functions in main.rs are marked unsafe.
"

Thanks to them being marked unsafe, it is easy to locate and validate what the code is allowed to do. [/q]

Holy Roman Empire!

Reply Parent Score: 2

RE[4]: Comment by BBAP
by Rugxulo on Mon 27th May 2013 18:56 in reply to "RE[3]: Comment by BBAP"
Rugxulo Member since:
2007-10-09

two of the three functions in main.rs are marked unsafe.


I could be wrong, but I assume that refers to disabling the garbage collector (a la Modula-3).

Reply Parent Score: 1

RE[5]: Comment by BBAP
by Vanders on Tue 28th May 2013 11:45 in reply to "RE[4]: Comment by BBAP"
Vanders Member since:
2005-07-06

No, it's not that: http://static.rust-lang.org/doc/rust.html#unsafe-functions

Unsafe operations are those that potentially violate the memory-safety guarantees of Rust's static semantics. Specifically, the following operations are considered unsafe:

Dereferencing a raw pointer.
Casting a raw pointer to a safe pointer type.
Calling an unsafe function.


So basically, not much different to raw pointer operations in C.

Reply Parent Score: 2