News for hackers. Stuff that matters.
Re:Writing an OS in Rust: Catching CPU Exceptions by Animats on Saturday May 28, 2016 @05:31PM (#11793633)
This is interesting, but it's not the hard part of exception handling. The next step is doing something to the state of the process that got the exception. If the exception comes from a userspace process, that's OK, because those processes aren't part of the Rust OS. But if the exception comes from kernel code, there's a problem. Rust code has to mess with the internal state of Rust code.

Signals have the same issue in ordinary Rust programs. See [1]. What's the state of the Rust world when you're in a signal handler?

[1] https://github.com/rust-lang/rust/issues/11203

Re:Writing an OS in Rust: Catching CPU Exceptions by Manishearth on Saturday May 28, 2016 @10:11PM (#11794476)
That's a two year old, closed, issue, from when rust had a runtime, probably doesn't apply anymore.

I don't think signal handlers are a big deal because global mutable state in rust is rare; and when it exists it probably is immune to the issues -- global mutable state in rust is required to be thread safe (since rust doesn't know if you are using threads), which should make it signal -safe too.

Re:Writing an OS in Rust: Catching CPU Exceptions by bogomipz on Sunday May 29, 2016 @01:01AM (#11794880)
Not sure what you mean, doesn't Rust have a runtime now?
Re:Writing an OS in Rust: Catching CPU Exceptions by Manishearth on Sunday May 29, 2016 @06:34AM (#11795852)
Everything has a runtime, except perhaps hand-rolled assembly. Rust today has a C-like runtime, which is bare minimum and makes it possible to FFI easily. For the most part you can pretend it doesn't exist; it doesn't affect programs.

In the past, Rust did have a bulkier runtime with a green thread scheduler and libuv; a runtime that "mattered".

Re:Writing an OS in Rust: Catching CPU Exceptions by nemaar on Sunday May 29, 2016 @03:15AM (#11795292)
It has a runtime comparable to C. Back in those days, it had a much larger one.
Re:Writing an OS in Rust: Catching CPU Exceptions by bogomipz on Sunday May 29, 2016 @10:28AM (#11796469)
Ok, that's what I thought : )

It interesting that they stripped down the runtime from previous(larger) iterations. Are those discussion discussed anywhere that you know about? It seems like that would be an interesting read.

Re:Writing an OS in Rust: Catching CPU Exceptions by Manishearth on Monday May 30, 2016 @01:53AM (#11799792)
https://github.com/rust-lang/rfcs/blob/master/text/0230-remo... and the PR/issue linked there.

There are also old mailing list discussions on rust-dev somewhere which discuss this IIRC.