Commit 4eb4835a authored by Steve Klabnik's avatar Steve Klabnik Committed by GitHub
Browse files

Update unsafe count

It's much better these days!

    $ cd redox
    $ git grep "unsafe" kernel/ | wc -l
    $ loc kernel/
     Language             Files        Lines        Blank      Comment         Code
     Rust                    42         5743          894          366         4483
parent ea8a8db7
......@@ -5,7 +5,7 @@ Unsafes
In that light, a kernel cannot be 100% safe, however the unsafe parts have to be marked with an `unsafe`, which keeps the unsafe parts segregated from the safe code. We seek to eliminate the `unsafe`s where we can, and when we use `unsafe`s, we are extremely careful.
A quick grep gives us some stats: The kernel has 16.52% unsafe code, a 50% improvement in the last three weeks. User space has roughly ~0.2%.
A quick grep gives us some stats: the kernel has about 70 invocations of `unsafe` in about 4500 lines of code overall.
This contrasts with kernels written in C, which cannot make guarantees about safety without costly formal analysis.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment