News for hackers. Stuff that matters.
Re:Experiences Building an OS in Rust by dbaupp on Saturday October 03, 2015 @06:22PM (#10325619)
The compiler has no concept of what a thread is anywhere, even in the standard library. The safety is imposed by careful bounds on exactly the right functions: those that interact/create new threads, e.g. std::thread::spawn has signature:

  pub fn spawn<F, T>(f: F) -> JoinHandle<T>
      where F: Send + 'static + FnOnce() -> T, T: Send + 'static
Other than implementations of `Send`/`Sync` themselves, this is essentially the only function in std that needs to bound by them.

The same approach can be used in a kernel context, e.g. place bounds on the functions that create (or, at least, initialise interaction between) concurrently executing pieces of code.

Re:Experiences Building an OS in Rust by acconsta on Saturday October 03, 2015 @07:28PM (#10325820)
Ah, so Rust does represent thread semantics through types? It's curious that the authors don't mention that in their proposal.
Re:Experiences Building an OS in Rust by dbaupp on Saturday October 03, 2015 @08:00PM (#10325899)
Yeah, everything is driven by implementing (or not, as appropriate) Send and Sync for types.