3 ms·
Why is this written in C? I would have thought Rust would be the perfect fit for this.
by eridius 8y ago
Why is this written in C? I would have thought Rust would be the perfect fit for this.
- steveklabnik 8y agoThere are some: https://github.com/xiph/rav1e https://github.com/xiph/rav1e The projects behind this project are all in C, so I imagine that’s why. They probably don’t want to commit to Rust on the basis of this codec alone.
- devwastaken 8y agoafaik safe rust would not perform that well compared to unsafe. The main safe part could be the command line or API but using Rust brings you into the Rust ecosystem and it may just not be worth it to do if most of their code is going to be unsafe and purposefully use performance hacks and SIMD.
- steveklabnik 8y agoSafe Rust can outperform unsafe Rust. It really just depends.
- eridius 8y agoI don't see why most code would have to be unsafe. Presumably some of it would, but that unsafe code can generally be wrapped up in a safe interface (this is practically the entire purpose of libstd).