There is speculation that the only reason to link to the C library is for efficiency.
I am afraid that you forget about convenience here. Just because a function can be implemented as efficiently in Rust as it is in C (possibly using unsafe code and assembly) does not mean that it is convenient.
Instead of trying to create an optimized implementation for each platform under the sun, itβs just more convenient to be able to return to the already provided C function to start with it, and then gradually configure it for the platforms that you need if necessary.
Creating implementations specifically designed for hardware / OS is a long job, and if someone has already invested in it, it might make sense to just reuse its result!
source share