> I need to write a lot of unsafe code.
To contrast with application-level code, pcwalton has measured that less than 1% of Servo's code is contained within `unsafe` blocks.Exactly, and of course this leads me to wondering about computer architectures that "require" unsafe things in their kernels, versus things like Multics where the OS and hardware co-operated at some level to make things safe. Lots of interesting questions.
One possibility might be to add hardware support for fine-grained capability security - http://www.cl.cam.ac.uk/research/security/ctsrd/
Some of my closest friends in college specialized in operating systems, and we (mostly them) worked on http://xomb.org , an exokernel in D. I'd hope that today we'd choose Rust instead.
Julia Evans has been writing _fantastic_ series about a kernel in Rust: http://jvns.ca/blog/categories/kernel/
As she says "This is typical of a lot of Rust code I’m writing – I need to write a lot of unsafe code."
I'll have to give this 'minimum set' idea some thought. I think that safety will be more useful for things like kernel modules than in the kernel itself, though I'm not sure why I think that, exactly. Hmmmmm...