|
|
|
|
|
by josephg
34 days ago
|
|
No they really don't. 95% of rust is safe rust[1]. Also unsafe rust doesn't remove bounds checks. arr[idx] is bounds checked in every context. You can opt out of array bounds checking by writing unsafe { arr.get_unchecked(idx) } . But thats incredibly rare in practice. [1] https://cs.stanford.edu/~aozdemir/blog/unsafe-rust-syntax/ |
|
Based on the raw number of assorted crates, which has no bearing on kernel code. The more relevant question is, can a performant, cross-architecture, kernel ring-buffer be written in safe Rust?