3 ms·
I don't know much about glibc, but since you can call rust from C and vice versa, it seems like you could reimplement a few functions at a time, incrementally p
by thinkpad20 11y ago
I don't know much about glibc, but since you can call rust from C and vice versa, it seems like you could reimplement a few functions at a time, incrementally phasing out C code and replacing it with rust. Assuming, of course, that you agree with the author's thesis. This approach lets you reuse the same tests and do things like benchmarking etc to make sure the implementation is performant and compliant.
- kibwen 11y agoThis is exactly how Firefox is approaching it. Identify the most security-critical bits, wall them off into their own component, and rewrite it in Rust.
- bjz_ 11y agoYes! And the reverse has happened with Servo. Originally it was mainly a bag of C libraries with some layout code, then gradually they began swapping the pieces out for the Rust counterparts. This is how new software can be written - bootstrapping off the C infrastructure, then gradually transitioning more and more into Rust land.